summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-27 20:32:12 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-27 20:32:12 +0000
commit3597666677ef714071da9d3ab663e9b8f7b6219e (patch)
treee73c2fc82c544df449a29fa6af523096f0b74381
parentaa02a808ffdbb2a819809e85f369ec3ce1e26af6 (diff)
downloadmanaserv-3597666677ef714071da9d3ab663e9b8f7b6219e.tar.gz
manaserv-3597666677ef714071da9d3ab663e9b8f7b6219e.tar.bz2
manaserv-3597666677ef714071da9d3ab663e9b8f7b6219e.tar.xz
manaserv-3597666677ef714071da9d3ab663e9b8f7b6219e.zip
Some insignificant cleanup
-rw-r--r--src/game-server/effect.cpp8
-rw-r--r--src/game-server/effect.hpp14
2 files changed, 12 insertions, 10 deletions
diff --git a/src/game-server/effect.cpp b/src/game-server/effect.cpp
index eefd0594..7fb9aafc 100644
--- a/src/game-server/effect.cpp
+++ b/src/game-server/effect.cpp
@@ -20,7 +20,6 @@
*
*/
-
#include "game-server/effect.hpp"
#include "game-server/mapcomposite.hpp"
@@ -28,15 +27,13 @@
void Effect::update()
{
- if(mHasBeenShown == true)
+ if (mHasBeenShown)
GameState::enqueueRemove(this);
}
-
namespace Effects
{
- // Added for convince
- void show(int id, MapComposite *map, Point pos)
+ void show(int id, MapComposite *map, const Point &pos)
{
Effect *effect = new Effect(id);
effect->setMap(map);
@@ -44,4 +41,3 @@ namespace Effects
GameState::enqueueInsert(effect);
}
}
-
diff --git a/src/game-server/effect.hpp b/src/game-server/effect.hpp
index 058bd13c..76b6f9f9 100644
--- a/src/game-server/effect.hpp
+++ b/src/game-server/effect.hpp
@@ -35,10 +35,14 @@ class Effect : public Object
int getEffectId() const
{ return mEffectId; }
- // Removes effect after it has been shown
+ /**
+ * Removes effect after it has been shown.
+ */
virtual void update();
- // Called when the object has been shown to a player in the state loop
+ /**
+ * Called when the object has been shown to a player in the state loop.
+ */
void show()
{ mHasBeenShown = true; }
@@ -50,8 +54,10 @@ class Effect : public Object
namespace Effects
{
- // Added for convince
- void show(int id, MapComposite *map, Point pos);
+ /**
+ * Convenience method to show an effect.
+ */
+ void show(int id, MapComposite *map, const Point &pos);
// TODO: get this in sync with effects.xml
enum {