From: Tobias Markus Date: Thu, 22 Aug 2013 12:37:25 +0000 (+0200) Subject: Don't kill badguys twice when hitting spike after falling after being squished X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4a7c81e8b976522a88dc2e9ec8a40340c603d7ff;p=supertux.git Don't kill badguys twice when hitting spike after falling after being squished --- diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 46c0d70d9..8cbec1db3 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -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();