mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-03-09 06:30:29 +00:00
VoteOvertime stuff
This commit is contained in:
parent
d818f0b647
commit
9b06b68ab2
2 changed files with 13 additions and 5 deletions
|
|
@ -323,6 +323,8 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
{
|
||||
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
|
||||
%msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time @ ".";
|
||||
// VoteOvertime
|
||||
StartVOTimeVote(%game);
|
||||
}
|
||||
|
||||
case "VoteMatchStart":
|
||||
|
|
@ -783,9 +785,17 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
|||
{
|
||||
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
|
||||
$Host::TimeLimit = %newLimit;
|
||||
// VoteOvertime
|
||||
ResetVOTimeChanged(%game);
|
||||
// Reset the voted time limit when changing mission
|
||||
$TimeLimitChanged = 1;
|
||||
}
|
||||
else
|
||||
messageAll('MsgVoteFailed', '\c2The vote to change the mission time limit did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 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
|
||||
ResetVOall(%game);
|
||||
}
|
||||
}
|
||||
|
||||
//if the match has been started, reset the end of match countdown
|
||||
|
|
@ -1094,7 +1104,8 @@ function DefaultGame::passRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
|||
|
||||
function DefaultGame::stopRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||
{
|
||||
if(%admin && Game.scheduleVote !$= "")
|
||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||
if(%admin && Game.scheduleVote !$= "" && %curTimeLeftMS > 0)
|
||||
{
|
||||
stopCurrentVote();
|
||||
messageAll('MsgAdminForce', '\c2The Admin stopped the vote.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue