v3.0.1: fixed crashes when beaming ray is cast at map edges
This commit is contained in:
+5
@@ -86,6 +86,11 @@ public class BeamingRay extends TargetedClericSpell {
|
|||||||
|
|
||||||
int telePos = target;
|
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){
|
if (Dungeon.level.solid[telePos] || !Dungeon.level.heroFOV[telePos] || Actor.findChar(telePos) != null){
|
||||||
telePos = -1;
|
telePos = -1;
|
||||||
for (int i : PathFinder.NEIGHBOURS8){
|
for (int i : PathFinder.NEIGHBOURS8){
|
||||||
|
|||||||
Reference in New Issue
Block a user