Skip to content

Commit faa5463

Browse files
authored
Merge pull request #2062 from Semphriss/fix-badguy-deactivate
Badguys no longer deactivate if they aren't alive
2 parents 197a469 + 466c1dc commit faa5463

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/badguy/badguy.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ BadGuy::update(float dt_sec)
173173
return;
174174
}
175175
}
176-
if ((m_state != STATE_INACTIVE) && is_offscreen()) {
177-
if (m_state == STATE_ACTIVE) deactivate();
176+
177+
if (m_is_active_flag && is_offscreen()) {
178+
deactivate();
178179
set_state(STATE_INACTIVE);
179180
}
180181

0 commit comments

Comments
 (0)