From: Christoph Sommer Date: Fri, 26 May 2006 12:21:59 +0000 (+0000) Subject: Badguys now get their deactivate() method called prior to being deactivated X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6bf2f1540aebe6f01f51462825dc1d39311371d5;p=supertux.git Badguys now get their deactivate() method called prior to being deactivated SVN-Revision: 3592 --- diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 57bf79b60..676ecb7bf 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -75,6 +75,7 @@ BadGuy::update(float elapsed_time) return; } if(is_offscreen()) { + if (state == STATE_ACTIVE) deactivate(); set_state(STATE_INACTIVE); }