From 2694eb43bd61c0b8aaeb5073c8d81bf1177e0106 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 28 Sep 2019 23:32:57 -0400 Subject: [PATCH] v0.7.5: corrected cases where removed mobs were still being attacked --- .../shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 670650fd4..010ea4d0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -211,8 +211,8 @@ public abstract class Mob extends Char { //find a new enemy if.. boolean newEnemy = false; - //we have no enemy, or the current one is dead - if ( enemy == null || !enemy.isAlive() || state == WANDERING) + //we have no enemy, or the current one is dead/missing + if ( enemy == null || !enemy.isAlive() || !Actor.chars().contains(enemy) || state == WANDERING) newEnemy = true; //We are an ally, and current enemy is another ally. else if (alignment == Alignment.ALLY && enemy.alignment == Alignment.ALLY)