From 728f520264f850a965dd7dd41af269a41700d632 Mon Sep 17 00:00:00 2001 From: AstrlJelly Date: Mon, 4 Mar 2024 09:30:13 -0500 Subject: [PATCH] fix inactive cues + bg block check (#741) small oversight, crazy how "- 2" and a single variable can literally stop the game from working --- Assets/Scripts/Games/Cannery/Cannery.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Games/Cannery/Cannery.cs b/Assets/Scripts/Games/Cannery/Cannery.cs index 0545c86c..3e8de788 100644 --- a/Assets/Scripts/Games/Cannery/Cannery.cs +++ b/Assets/Scripts/Games/Cannery/Cannery.cs @@ -175,7 +175,7 @@ namespace HeavenStudio.Games public override void OnGameSwitch(double beat) { List events = GameManager.instance.Beatmap.Entities.FindAll(e => e.datamodel.Split('/')[0] == "cannery"); - List cans = events.FindAll(e => e.datamodel == "cannery/can" && beat > e.beat && beat < e.beat + 1); + List cans = events.FindAll(e => e.datamodel == "cannery/can" && beat > e.beat - 2 && beat < e.beat + 1); foreach (var can in cans) { SendCan(can.beat); } @@ -189,7 +189,7 @@ namespace HeavenStudio.Games } RiqEntity bgEvent = events.FindLast(e => e.datamodel == "cannery/backgroundModifiers" && e.beat < beat); if (bgEvent != null) { - var e = alarmEvent; + var e = bgEvent; BackgroundModifiers(e.beat, e.length, e["startSpeed"], e["endSpeed"], e["ease"]); } else { BackgroundModifiers(0, 0, 10, 10, (int)Util.EasingFunction.Ease.Instant);