Overtime Bug

This commit is contained in:
ChocoTaco 2025-06-23 15:38:00 -04:00
parent 1e6ad89251
commit 9aea8e23a6
2 changed files with 22 additions and 18 deletions

View file

@ -1266,8 +1266,9 @@ function CTFGame::checkTimeLimit(%game, %forced)
{ {
%teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP);
%teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP);
if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && $Host::TournamentMode){ //Setting exists if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){
if(!%game.overtime){ if(!%game.overtime)
{
%game.overtime = 1; %game.overtime = 1;
if($CTF::Overtime > 1){ %s = "s"; } if($CTF::Overtime > 1){ %s = "s"; }
messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $CTF::Overtime, %s); messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $CTF::Overtime, %s);
@ -1277,14 +1278,15 @@ function CTFGame::checkTimeLimit(%game, %forced)
%game.timeCheck = %game.schedule($CTF::Overtime * 60 * 1000, "timeLimitReached"); %game.timeCheck = %game.schedule($CTF::Overtime * 60 * 1000, "timeLimitReached");
} }
} }
else{ else
if(%game.scheduleVote !$= ""){ {
if(!%game.voteOT){ if(%game.scheduleVote !$= "" && !%game.voteOT)
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); {
%game.voteOT = 1; messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
} %game.voteOT = 1;
} }
else{ else
{
%game.timeLimitReached(); %game.timeLimitReached();
} }
} }

View file

@ -1566,8 +1566,9 @@ function LCTFGame::checkTimeLimit(%game, %forced)
{ {
%teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP); %teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP);
%teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP); %teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP);
if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && $Host::TournamentMode){ //Setting exists if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){
if(!%game.overtime){ if(!%game.overtime)
{
%game.overtime = 1; %game.overtime = 1;
if($LCTF::Overtime > 1){ %s = "s"; } if($LCTF::Overtime > 1){ %s = "s"; }
messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $LCTF::Overtime, %s); messageAll('MsgOvertime', '\c2Sudden-Death Overtime Initiated: %1 Minute%2 Remaining~wfx/powered/turret_heavy_activate.wav', $LCTF::Overtime, %s);
@ -1577,14 +1578,15 @@ function LCTFGame::checkTimeLimit(%game, %forced)
%game.timeCheck = %game.schedule($LCTF::Overtime * 60 * 1000, "timeLimitReached"); %game.timeCheck = %game.schedule($LCTF::Overtime * 60 * 1000, "timeLimitReached");
} }
} }
else{ else
if(%game.scheduleVote !$= ""){ {
if(!%game.voteOT){ if(%game.scheduleVote !$= "" && !%game.voteOT)
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); {
%game.voteOT = 1; messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
} %game.voteOT = 1;
} }
else{ else
{
%game.timeLimitReached(); %game.timeLimitReached();
} }
} }