From 050cbc241df8ce17dbf57c3dbf055ac0dc1c62ca Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:38:49 +0100 Subject: [PATCH] fixed quiz show bug --- Assets/Scripts/Games/QuizShow/QuizShow.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Assets/Scripts/Games/QuizShow/QuizShow.cs b/Assets/Scripts/Games/QuizShow/QuizShow.cs index 82ed32312..cf71c09fb 100644 --- a/Assets/Scripts/Games/QuizShow/QuizShow.cs +++ b/Assets/Scripts/Games/QuizShow/QuizShow.cs @@ -573,16 +573,7 @@ namespace HeavenStudio.Games ScheduleAutoplayInput(beat, length + inputBeat, InputAction_Right, AutoplayAButton, Nothing, Nothing); } } - - if (doingConsectiveIntervals) - { - countToMatch += relevantInputs.Count; - } - else - { - countToMatch = relevantInputs.Count; - } - int hundredLoops = Mathf.FloorToInt(countToMatch / 100); + int hundredLoops = Mathf.FloorToInt((float)countToMatch / 100f); countToMatch -= hundredLoops * 100; doingConsectiveIntervals = consecutive; float timeUpBeat = 0f; @@ -598,6 +589,14 @@ namespace HeavenStudio.Games { new BeatAction.Action(beat, delegate { + if (doingConsectiveIntervals) + { + countToMatch += relevantInputs.Count; + } + else + { + countToMatch = relevantInputs.Count; + } if (shouldPrepareArms) { contesteeLeftArmAnim.DoScaledAnimationAsync("LeftPrepare", 0.5f);