From f8c76e52d989849f3f6f0a8b9550ad2079191261 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 20 Sep 2021 22:57:31 -0400 Subject: [PATCH] v1.1.0: fixed an exploit where quitting could cancel enemy attacks --- .../shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 61c3d8c51..ff9465626 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 @@ -538,7 +538,6 @@ public abstract class Mob extends Char { if (sprite != null && (sprite.visible || enemy.sprite.visible)) { sprite.attack( enemy.pos ); - spend( attackDelay() ); return false; } else { @@ -551,6 +550,7 @@ public abstract class Mob extends Char { @Override public void onAttackComplete() { attack( enemy ); + spend( attackDelay() ); super.onAttackComplete(); }