From 014a25d3032ace6682ddbc444607301e833c7327 Mon Sep 17 00:00:00 2001 From: Beu Date: Mon, 1 Nov 2021 11:05:09 +0100 Subject: [PATCH] add ability to change the S_AllowCam7DuringWaitingScreen value during the Waiting Screen --- TM_RoyalRounds_Online.Script.txt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/TM_RoyalRounds_Online.Script.txt b/TM_RoyalRounds_Online.Script.txt index 5912aa7..7c7105b 100644 --- a/TM_RoyalRounds_Online.Script.txt +++ b/TM_RoyalRounds_Online.Script.txt @@ -193,11 +193,8 @@ if (Map_Starts.count > 0) { MB_StopMap(); } -// We use `>= 0` and not `> 0` here because the waiting screen -// has two steps. First waiting for the presence of at least one player. -// Then waiting the desired amount of time. With `>= 0` we can have -// the first step without the second. -declare Integer WaitingScreenDuration = S_RoundWaitingScreenDuration; +// Waiting screen +declare Integer WaitingScreenDuration = 0; if (WaitingScreenDuration >= 0) { if (S_AllowCam7DuringWaitingScreen) ModeUtils::PushAndApplyUISequence(UIManager.UIAll, CUIConfig::EUISequence::Playing); else ModeUtils::PushAndApplyUISequence(UIManager.UIAll, CUIConfig::EUISequence::RollingBackgroundIntro); @@ -210,14 +207,14 @@ if (WaitingScreenDuration >= 0) { // If all players are connected before the end of the countdown start immediatly declare Integer WaitEndTime = Now + (WaitingScreenDuration * 1000); - while (WaitingScreenDuration > 0) { - if (WaitingScreenDuration > 3) { - UIModules_BigMessage::SetMessage("""The map starts in {{{WaitingScreenDuration}}} seconds"""); + while (S_RoundWaitingScreenDuration - WaitingScreenDuration > 0) { + if (S_RoundWaitingScreenDuration - WaitingScreenDuration > 3) { + UIModules_BigMessage::SetMessage("""The map starts in {{{S_RoundWaitingScreenDuration - WaitingScreenDuration}}} seconds"""); } else { UIModules_BigMessage::SetMessage(""); - UIManager.UIAll.BigMessage = """The map starts in {{{WaitingScreenDuration}}} seconds"""; + UIManager.UIAll.BigMessage = """The map starts in {{{S_RoundWaitingScreenDuration - WaitingScreenDuration}}} seconds"""; } - WaitingScreenDuration = WaitingScreenDuration - 1; + WaitingScreenDuration = WaitingScreenDuration + 1; MB_Sleep(1000); } UIManager.UIAll.BigMessage = "";