From: Wolfgang Becker Date: Sat, 30 Sep 2006 09:19:56 +0000 (+0000) Subject: Stop dispense_timer on deactivate. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9d2b5396f9ac69ae79d9f58e21eabbddfc9359de;p=supertux.git Stop dispense_timer on deactivate. SVN-Revision: 4324 --- diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index c0fdbf8f6..2f3dce533 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -66,6 +66,13 @@ Dispenser::activate() launch_badguy(); } +void +Dispenser::deactivate() +{ + dispense_timer.stop(); +} + +//TODO: Add launching velocity to certain badguys bool Dispenser::collision_squished(Player& player) { @@ -85,7 +92,6 @@ Dispenser::active_update(float ) } } -//TODO: Add launching velocity to certain badguys // Add themed randomizer void Dispenser::launch_badguy() diff --git a/src/badguy/dispenser.hpp b/src/badguy/dispenser.hpp index 90f2a3a06..5313b4f53 100644 --- a/src/badguy/dispenser.hpp +++ b/src/badguy/dispenser.hpp @@ -29,6 +29,7 @@ public: Dispenser(const lisp::Lisp& reader); void activate(); + void deactivate(); void write(lisp::Writer& writer); void active_update(float elapsed_time);