From 4ed72efeae45ee8788c42f99f8b5e7b1f1bf4503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 2 Sep 2025 11:22:41 +0200 Subject: [PATCH] Use better guard (and reword subsequent comment) Co-authored-by: Dean Herbert --- osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs b/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs index 525f6f62ad..eedde8b7a4 100644 --- a/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs +++ b/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs @@ -59,10 +59,12 @@ namespace osu.Game.Screens.Edit.GameplayTest { base.LoadAsyncComplete(); - // `preventMissOnPreviousHitObjects()` needs to be called to install its hooks before drawable hit objects get the chance to run update logic, + if (!LoadedBeatmapSuccessfully) + return; + + // This hack needs to be called to install its hooks before drawable hit objects get the chance to run update logic, // because it will not work otherwise due to being too late (various effects of the objects getting missed will have already taken place). - if (DrawableRuleset != null) - preventMissOnPreviousHitObjects(); + preventMissOnPreviousHitObjects(); } protected override void LoadComplete()