v0.9.4: fixed player triggering chasm window after moving away

This commit is contained in:
Evan Debenham 2021-08-03 19:42:49 -04:00
parent 36dcb43213
commit 4e5f8414d9

View File

@ -52,8 +52,10 @@ import com.watabou.utils.Random;
public class Chasm implements Hero.Doom { public class Chasm implements Hero.Doom {
public static boolean jumpConfirmed = false; public static boolean jumpConfirmed = false;
private static int heroPos;
public static void heroJump( final Hero hero ) { public static void heroJump( final Hero hero ) {
heroPos = hero.pos;
Game.runOnRenderThread(new Callback() { Game.runOnRenderThread(new Callback() {
@Override @Override
public void call() { public void call() {
@ -66,8 +68,10 @@ public class Chasm implements Hero.Doom {
@Override @Override
protected void onSelect( int index ) { protected void onSelect( int index ) {
if (index == 0) { if (index == 0) {
jumpConfirmed = true; if (Dungeon.hero.pos == heroPos) {
hero.resume(); jumpConfirmed = true;
hero.resume();
}
} }
} }
} }