From 9aea8e23a6c52e5193d3f39d14d6aaffc1e47b27 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 23 Jun 2025 15:38:00 -0400 Subject: [PATCH] Overtime Bug --- Classic/scripts/CTFGame.cs | 20 +++++++++++--------- Classic/scripts/LCTFGame.cs | 20 +++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Classic/scripts/CTFGame.cs b/Classic/scripts/CTFGame.cs index e26cda5..5677f3c 100755 --- a/Classic/scripts/CTFGame.cs +++ b/Classic/scripts/CTFGame.cs @@ -1266,8 +1266,9 @@ function CTFGame::checkTimeLimit(%game, %forced) { %teamOneCaps = mFloor($TeamScore[1] / %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(!%game.overtime){ + if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){ + if(!%game.overtime) + { %game.overtime = 1; 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); @@ -1277,14 +1278,15 @@ function CTFGame::checkTimeLimit(%game, %forced) %game.timeCheck = %game.schedule($CTF::Overtime * 60 * 1000, "timeLimitReached"); } } - else{ - if(%game.scheduleVote !$= ""){ - if(!%game.voteOT){ - messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); - %game.voteOT = 1; - } + else + { + if(%game.scheduleVote !$= "" && !%game.voteOT) + { + messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); + %game.voteOT = 1; } - else{ + else + { %game.timeLimitReached(); } } diff --git a/Classic/scripts/LCTFGame.cs b/Classic/scripts/LCTFGame.cs index c9754c3..e856790 100644 --- a/Classic/scripts/LCTFGame.cs +++ b/Classic/scripts/LCTFGame.cs @@ -1566,8 +1566,9 @@ function LCTFGame::checkTimeLimit(%game, %forced) { %teamOneCaps = mFloor($TeamScore[1] / %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(!%game.overtime){ + if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){ + if(!%game.overtime) + { %game.overtime = 1; 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); @@ -1577,14 +1578,15 @@ function LCTFGame::checkTimeLimit(%game, %forced) %game.timeCheck = %game.schedule($LCTF::Overtime * 60 * 1000, "timeLimitReached"); } } - else{ - if(%game.scheduleVote !$= ""){ - if(!%game.voteOT){ - messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); - %game.voteOT = 1; - } + else + { + if(%game.scheduleVote !$= "" && !%game.voteOT) + { + messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav'); + %game.voteOT = 1; } - else{ + else + { %game.timeLimitReached(); } }