From 9d2b5396f9ac69ae79d9f58e21eabbddfc9359de Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Sat, 30 Sep 2006 09:19:56 +0000 Subject: [PATCH] Stop dispense_timer on deactivate. SVN-Revision: 4324 --- src/badguy/dispenser.cpp | 8 +++++++- src/badguy/dispenser.hpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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); -- 2.11.0