From 6fc467cf07c3f9fec4cd82e7079fd8ad0c70884e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 6 Mar 2025 11:32:52 -0500 Subject: [PATCH] v3.0.1: fixed crashes when beaming ray is cast at map edges --- .../shatteredpixeldungeon/actors/hero/spells/BeamingRay.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java index 53fba9d97..30be865cc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/BeamingRay.java @@ -86,6 +86,11 @@ public class BeamingRay extends TargetedClericSpell { int telePos = target; + if (!Dungeon.level.insideMap(telePos)){ + GLog.w(Messages.get(this, "no_space")); + return; + } + if (Dungeon.level.solid[telePos] || !Dungeon.level.heroFOV[telePos] || Actor.findChar(telePos) != null){ telePos = -1; for (int i : PathFinder.NEIGHBOURS8){