Dont aim at dead

This commit is contained in:
Miloslav Číž 2020-11-18 18:36:38 +01:00
parent 98d379041d
commit a3f84157d2
1 changed files with 5 additions and 2 deletions

5
game.h
View File

@ -2903,7 +2903,10 @@ RCL_Unit SFG_autoaimVertically()
{
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;