From 0cce050429d129b215c98ac484cb7aba6ef8050c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 24 Sep 2025 16:29:52 -0400 Subject: [PATCH] v3.2.5: fixed very specific errors relating to inter-floor teleports --- .../items/spells/BeaconOfReturning.java | 2 +- .../shatteredpixeldungeon/scenes/GameScene.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java index 7a17a654f..ff02eed4a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java @@ -131,7 +131,7 @@ public class BeaconOfReturning extends Spell { Char existing = Actor.findChar(returnPos); if (existing != null && existing != hero){ - Char toPush = !Char.hasProp(existing, Char.Property.IMMOVABLE) ? hero : existing; + Char toPush = Char.hasProp(existing, Char.Property.IMMOVABLE) ? hero : existing; ArrayList candidates = new ArrayList<>(); for (int n : PathFinder.NEIGHBOURS8) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index b8c2dbe97..81511299f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -527,7 +527,17 @@ public class GameScene extends PixelScene { new Flare( 5, 16 ).color( 0xFFFF00, true ).show( hero, 4f ) ; break; case RETURN: - ScrollOfTeleportation.appearVFX( Dungeon.hero ); + if (Dungeon.level.pit[Dungeon.hero.pos] && !Dungeon.hero.flying){ + //delay this so falling into the chasm processes properly + ShatteredPixelDungeon.runOnRenderThread(new Callback() { + @Override + public void call() { + ScrollOfTeleportation.appearVFX(Dungeon.hero); + } + }); + } else { + ScrollOfTeleportation.appearVFX(Dungeon.hero); + } break; case DESCEND: case FALL: