From 4981af6438f94f2e253ec0f77430b292de34d712 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 4 Oct 2012 19:36:05 +0200 Subject: [PATCH] Added empty default implementation for Character::onThink. --- source/abstract/Character.cpp | 9 +++++++++ source/abstract/Character.h | 8 +------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/abstract/Character.cpp b/source/abstract/Character.cpp index 72f1f78..29b0d6c 100644 --- a/source/abstract/Character.cpp +++ b/source/abstract/Character.cpp @@ -67,6 +67,15 @@ Character::onDamage(int damage) { } } +/** + * Implement this function for any (regular) AI computations. Default implementation does nothing. + * + * @param elapsedTime Amount of time to simulate. + */ +void +Character::onThink(float elapsedTime) { +} + /** * Called when health reaches zero. Default immplementation does nothing. */ diff --git a/source/abstract/Character.h b/source/abstract/Character.h index be6da00..b0aa530 100644 --- a/source/abstract/Character.h +++ b/source/abstract/Character.h @@ -32,13 +32,7 @@ public: // Protected functions. protected: - /** - * Implement this function for any (regular) AI computations. - * - * @param elapsedTime Amount of time to simulate. - */ - virtual void onThink(float elapsedTime) = 0; - + virtual void onThink(float elapsedTime); virtual void onDeath(); // Private variables.