From 4e5f8414d9f72d18d2ad4caa407a079a99a45619 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 3 Aug 2021 19:42:49 -0400 Subject: [PATCH] v0.9.4: fixed player triggering chasm window after moving away --- .../shatteredpixeldungeon/levels/features/Chasm.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java index 537e0a4f9..ab456baef 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java @@ -52,8 +52,10 @@ import com.watabou.utils.Random; public class Chasm implements Hero.Doom { public static boolean jumpConfirmed = false; + private static int heroPos; public static void heroJump( final Hero hero ) { + heroPos = hero.pos; Game.runOnRenderThread(new Callback() { @Override public void call() { @@ -66,8 +68,10 @@ public class Chasm implements Hero.Doom { @Override protected void onSelect( int index ) { if (index == 0) { - jumpConfirmed = true; - hero.resume(); + if (Dungeon.hero.pos == heroPos) { + jumpConfirmed = true; + hero.resume(); + } } } }