Took Out z0dd Vote % Calc

All the deleted lines are Atom editor taking out extra spaces/tabs etc
This commit is contained in:
ChocoTaco1 2021-01-04 14:53:18 -05:00
parent 98dfa4a3fa
commit 253100ec10

View file

@ -765,9 +765,8 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName ); messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName );
%game.gameOver(); %game.gameOver();
@ -803,9 +802,8 @@ function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %t
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2Server switched to Tournament mode by vote (%1): %2 percent.', %missionDisplayName, mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVotePassed', '\c2Server switched to Tournament mode by vote (%1): %2 percent.', %missionDisplayName, mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
setModeTournament( %mission, %missionType ); setModeTournament( %mission, %missionType );
@ -834,9 +832,8 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display); messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
$Host::TimeLimit = %newLimit; $Host::TimeLimit = %newLimit;
@ -880,9 +877,8 @@ function DefaultGame::voteFFAMode( %game, %admin, %client )
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2Server switched to Free For All mode by vote.', %client); messageAll('MsgVotePassed', '\c2Server switched to Free For All mode by vote.', %client);
setModeFFA($CurrentMission, $CurrentMissionType); setModeFFA($CurrentMission, $CurrentMissionType);
@ -903,9 +899,8 @@ function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4)
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The mission was skipped to next by vote.'); messageAll('MsgVotePassed', '\c2The mission was skipped to next by vote.');
echo("mission skipped (vote)"); echo("mission skipped (vote)");
@ -946,9 +941,8 @@ function DefaultGame::voteMatchStart( %game, %admin)
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100)); messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
startTourneyCountdown(); startTourneyCountdown();
@ -981,9 +975,8 @@ function DefaultGame::voteTeamDamage(%game, %admin)
} }
else else
{ {
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
{ {
if($teamDamage) if($teamDamage)
{ {