Skip to content

Commit

Permalink
Don't kill badguys twice when hitting spike after falling after being…
Browse files Browse the repository at this point in the history
… squished
  • Loading branch information
tobbi committed Oct 26, 2013
1 parent bff1ddb commit 4a7c81e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/badguy/badguy.cpp
Expand Up @@ -219,6 +219,9 @@ BadGuy::inactive_update(float )
void
BadGuy::collision_tile(uint32_t tile_attributes)
{
// Don't kill badguys that have already been killed
if (!is_active()) return;

if(tile_attributes & Tile::HURTS) {
if (tile_attributes & Tile::FIRE) {
if (is_flammable()) ignite();
Expand Down

0 comments on commit 4a7c81e

Please sign in to comment.