From ef663fd0e28057371a6105ce04b475121dfdf545 Mon Sep 17 00:00:00 2001 From: BSzili Date: Fri, 13 Jun 2025 06:12:52 +0200 Subject: [PATCH] fix dead bats getting stuck in circling state --- src/fixed/enemy.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fixed/enemy.h b/src/fixed/enemy.h index a0e7a7fe..4325cac0 100644 --- a/src/fixed/enemy.h +++ b/src/fixed/enemy.h @@ -139,9 +139,6 @@ struct Enemy : ItemObj tinfo.canAttack = false; tinfo.rotHead = 0; - if (health <= 0) - return; - // update navigation target const uint16* zones = getZones(); @@ -152,6 +149,9 @@ struct Enemy : ItemObj //@TODO blocking + if (health <= 0) + return; + if (tinfo.target->health <= 0) { hitMask = 0;