mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 16:14:35 +00:00
Reverted Non-Voters
This commit is contained in:
parent
79a8c0e668
commit
0941841a18
1 changed files with 31 additions and 24 deletions
|
|
@ -765,15 +765,16 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %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();
|
||||||
loadMission( %mission, %missionType, false );
|
loadMission( %mission, %missionType, false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -802,14 +803,15 @@ function DefaultGame::voteTournamentMode( %game, %admin, %missionDisplayName, %t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
|
||||||
{
|
{
|
||||||
messageAll('MsgVotePassed', '\c2Server switched to Tournament mode by vote (%1): %2 percent.', %missionDisplayName, mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 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 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Tournament mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Tournament mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%cause !$= "")
|
if(%cause !$= "")
|
||||||
|
|
@ -832,8 +834,9 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %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;
|
||||||
|
|
@ -844,7 +847,7 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
// VoteOvertime
|
// VoteOvertime
|
||||||
ResetVOall(%game);
|
ResetVOall(%game);
|
||||||
}
|
}
|
||||||
|
|
@ -877,14 +880,15 @@ function DefaultGame::voteFFAMode( %game, %admin, %client )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %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);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Free For All mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Free For All mode vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -899,8 +903,9 @@ function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %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)");
|
||||||
|
|
@ -909,7 +914,7 @@ function DefaultGame::voteSkipMission(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
cycleMissions();
|
cycleMissions();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Skip mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Skip mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -941,14 +946,15 @@ function DefaultGame::voteMatchStart( %game, %admin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
|
||||||
{
|
{
|
||||||
messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVotePassed', '\c2The match has been started by vote: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
startTourneyCountdown();
|
startTourneyCountdown();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Start Match vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Start Match vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -975,8 +981,9 @@ function DefaultGame::voteTeamDamage(%game, %admin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
|
// 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 - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
|
||||||
{
|
{
|
||||||
if($teamDamage)
|
if($teamDamage)
|
||||||
{
|
{
|
||||||
|
|
@ -994,9 +1001,9 @@ function DefaultGame::voteTeamDamage(%game, %admin)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($teamDamage)
|
if($teamDamage)
|
||||||
messageAll('MsgVoteFailed', '\c2Disable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Disable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
else
|
else
|
||||||
messageAll('MsgVoteFailed', '\c2Enable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100));
|
messageAll('MsgVoteFailed', '\c2Enable team damage vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue