From 8b9821d78f5b49fa396d36a4e9f6a2687e47e5a1 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 25 Aug 2021 13:10:01 -0400 Subject: [PATCH] v1.0.1: fixed a crash caused by AI changes --- .../shatteredpixeldungeon/actors/mobs/GnollTrickster.java | 2 +- .../shatteredpixeldungeon/actors/mobs/Scorpio.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java index df07a028a..c18137331 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java @@ -105,7 +105,7 @@ public class GnollTrickster extends Gnoll { @Override public void aggro(Char ch) { //cannot be aggroed to something it can't see - if (fieldOfView == null || fieldOfView[ch.pos]) { + if (ch == null || fieldOfView == null || fieldOfView[ch.pos]) { super.aggro(ch); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java index e0bd8a232..f18c53bde 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java @@ -97,7 +97,7 @@ public class Scorpio extends Mob { @Override public void aggro(Char ch) { //cannot be aggroed to something it can't see - if (fieldOfView == null || fieldOfView[ch.pos]) { + if (ch == null || fieldOfView == null || fieldOfView[ch.pos]) { super.aggro(ch); } }