From a3f84157d2f0cf2d6423b99312d157b20c309af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Wed, 18 Nov 2020 18:36:38 +0100 Subject: [PATCH] Dont aim at dead --- game.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game.h b/game.h index 513f26e..c4dc27f 100755 --- a/game.h +++ b/game.h @@ -2902,8 +2902,11 @@ RCL_Unit SFG_autoaimVertically() for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) { SFG_MonsterRecord m = SFG_currentLevel.monsterRecords[i]; - - if (SFG_MR_STATE(m) == SFG_MONSTER_STATE_INACTIVE) + + uint8_t state = SFG_MR_STATE(m); + + if (state == SFG_MONSTER_STATE_INACTIVE || + state == SFG_MONSTER_STATE_DEAD) continue; RCL_Vector2D worldPosition, toMonster;