v3.0.1: fixed crashes when beaming ray is cast at map edges

This commit is contained in:
Evan Debenham
2025-03-06 11:32:52 -05:00
parent 876bb8ec66
commit 6fc467cf07

View File

@@ -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){