summaryrefslogtreecommitdiff
path: root/src/game-server/being.hpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-29 21:31:39 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-29 21:31:39 +0000
commit8ddad761280216252953bee9467e2787aaee484e (patch)
treef13f79281964fd8f1bcdf49e52aa657995693565 /src/game-server/being.hpp
parentdf8c5ed43b5513916eff1b3f25e0bba6a50c8826 (diff)
downloadmanaserv-8ddad761280216252953bee9467e2787aaee484e.tar.gz
manaserv-8ddad761280216252953bee9467e2787aaee484e.tar.bz2
manaserv-8ddad761280216252953bee9467e2787aaee484e.tar.xz
manaserv-8ddad761280216252953bee9467e2787aaee484e.zip
Some code formatting cleanup and unduplicated conversion from direction to
angle.
Diffstat (limited to 'src/game-server/being.hpp')
-rw-r--r--src/game-server/being.hpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game-server/being.hpp b/src/game-server/being.hpp
index fe17007d..869740eb 100644
--- a/src/game-server/being.hpp
+++ b/src/game-server/being.hpp
@@ -222,15 +222,18 @@ class Being : public MovingObject
virtual void modifiedAttribute(int) {}
/** Gets the name of the being. */
- std::string const &
- getName() const
+ std::string const &getName() const
{ return mName; }
/** Sets the name of the being. */
- void
- setName(const std::string& name)
+ void setName(const std::string &name)
{ mName = name; }
+ /**
+ * Converts a direction to an angle. Used for combat hit checks.
+ */
+ static int directionToAngle(int direction);
+
protected:
static const int TICKS_PER_HP_REGENERATION = 100;
Action mAction;
@@ -240,10 +243,10 @@ class Being : public MovingObject
Being(Being const &rhs);
Being &operator=(Being const &rhs);
- std::string mName; /**< Name of the being. */
- Hits mHitsTaken; /**< List of punches taken since last update */
+ std::string mName;
+ Hits mHitsTaken; /**< List of punches taken since last update. */
AttributeModifiers mModifiers; /**< Currently modified attributes. */
- int mHpRegenTimer; /**< timer for hp regeneration*/
+ int mHpRegenTimer; /**< Timer for hp regeneration. */
};
#endif // _TMWSERV_BEING_H_