From 1c6156a75662d956575122af5830dd1243c6ec30 Mon Sep 17 00:00:00 2001 From: Lozen <865466388@qq.com> Date: Tue, 3 Sep 2024 19:43:41 +0800 Subject: [PATCH] v2.0.4 --- Source/Gameplay/CassetteBlockHelper.cs | 8 +++++--- Source/Gameplay/ConsoleEnhancement.cs | 3 +-- Source/Module/WhatsNew.cs | 5 +++-- everest.yaml | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Gameplay/CassetteBlockHelper.cs b/Source/Gameplay/CassetteBlockHelper.cs index cde4184..e62ba4a 100644 --- a/Source/Gameplay/CassetteBlockHelper.cs +++ b/Source/Gameplay/CassetteBlockHelper.cs @@ -698,11 +698,13 @@ public static void Initialize(Entity entity, out int currColorIndex, out int max private static void SupportJungleHelper() { jungle_SwingBlockType = ModUtils.GetType("JungleHelper", "Celeste.Mod.JungleHelper.Entities.SwingCassetteBlock"); } - + + private const int infiniteLoopPreventer = 2048; public static bool GetLoopCount(float advanceTime, out int count) { count = 0; - float time = Engine.DeltaTime * tempoMult; - while (advanceTime > 0) { + float time = Engine.DeltaTime * tempoMult; + // if tempoMult = 0, then infinite loop + while (advanceTime > 0 && count < infiniteLoopPreventer) { advanceTime -= time; count++; } diff --git a/Source/Gameplay/ConsoleEnhancement.cs b/Source/Gameplay/ConsoleEnhancement.cs index cd7d0f1..b480f9f 100644 --- a/Source/Gameplay/ConsoleEnhancement.cs +++ b/Source/Gameplay/ConsoleEnhancement.cs @@ -182,8 +182,7 @@ private static void OnCommandUpdateOpen(On.Monocle.Commands.orig_UpdateOpen orig */ } } - - // it seems this bug is gone? + [TasDisableRun] private static void MinorBugFixer() { // if open debugconsole and close it when in tas, then exit tas (without running any frame), debugconsole will show up diff --git a/Source/Module/WhatsNew.cs b/Source/Module/WhatsNew.cs index 61629bc..f334db9 100644 --- a/Source/Module/WhatsNew.cs +++ b/Source/Module/WhatsNew.cs @@ -72,8 +72,9 @@ public static void CreateUpdateLog() { AddLog("1.9.15", "Feature: Show the hitbox of Hollow Knight Nail from FlaglinesAndSuch.", "Feature: Spinner related features now support ChroniaHelper's SeamlessSpinner."); AddLog("2.0.0", "Migrate to Everest Core, and target psyGamer's branch of CelesteTAS."); AddLog("2.0.1", "Bugfix: Game crashes when there is simplified spinner / lightning. (thanks @trans_alexa)"); - AddLog("2.0.2", "Feature: AutoWatchEntity put into use.", "Optimization: Now you can enter OptionSubMenu by just pressing down."); - AddLog("2.0.3", "Bugfix: resolve incompatibility with SpeedrunTool", "Addition: Add more options to AutoWatch."); + AddLog("2.0.2", "Feature: AutoWatchEntity put into use. (the name comes from @XMinty77)", "Optimization: Now you can enter OptionSubMenu by just pressing down."); + AddLog("2.0.3", "Bugfix: resolve incompatibility with SpeedrunTool", "Addition: Add more options to AutoWatch."); + AddLog("2.0.4", "Bugfix: If Cassette tempo = 0 and there's freeze frame, then game gets stuck (Thanks @trans_alexa)"); UpdateLogs.Sort((x, y) => new Version(y.Item1).CompareTo(new Version(x.Item1))); } diff --git a/everest.yaml b/everest.yaml index 0e05ced..8060bfd 100644 --- a/everest.yaml +++ b/everest.yaml @@ -1,5 +1,5 @@ - Name: TASHelper - Version: 2.0.3 + Version: 2.0.4 DLL: bin/Release/net7.0/TASHelper.dll Dependencies: - Name: EverestCore