summaryrefslogtreecommitdiff
path: root/src/game-server/object.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-02 23:30:17 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-02 23:30:17 +0000
commitaf1ce69940a9c0b46907402e7d69e6ac9ea96912 (patch)
tree016a6a8a4734f794e56093e1611530749eb7fab0 /src/game-server/object.hpp
parent07782116ae9158c20165dd4d60bdb96017ac009f (diff)
downloadmanaserv-af1ce69940a9c0b46907402e7d69e6ac9ea96912.tar.gz
manaserv-af1ce69940a9c0b46907402e7d69e6ac9ea96912.tar.bz2
manaserv-af1ce69940a9c0b46907402e7d69e6ac9ea96912.tar.xz
manaserv-af1ce69940a9c0b46907402e7d69e6ac9ea96912.zip
Implemented being death, removal of dead mobs and sitting.
Diffstat (limited to 'src/game-server/object.hpp')
-rw-r--r--src/game-server/object.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/game-server/object.hpp b/src/game-server/object.hpp
index e0443f93..b067b34b 100644
--- a/src/game-server/object.hpp
+++ b/src/game-server/object.hpp
@@ -44,9 +44,11 @@ class MapComposite;
enum
{
- NEW_ON_MAP = 1,
- NEW_DESTINATION = 2,
- ATTACK = 4
+ UPDATEFLAG_NEW_ON_MAP = 1,
+ UPDATEFLAG_NEW_DESTINATION = 2,
+ UPDATEFLAG_ATTACK = 4,
+ UPDATEFLAG_ACTIONCHANGE = 8,
+ UPDATEFLAG_REMOVE = 16
};
/**
@@ -198,7 +200,7 @@ class MovingObject: public Object
* Sets the destination coordinates of the object.
*/
void setDestination(Point dst)
- { mDst = dst; raiseUpdateFlags(NEW_DESTINATION); mPath.clear(); }
+ { mDst = dst; raiseUpdateFlags(UPDATEFLAG_NEW_DESTINATION); mPath.clear(); }
/**
* Gets the old coordinates of the object.
@@ -239,7 +241,7 @@ class MovingObject: public Object
/**
* Moves the object toward its destination.
*/
- void move();
+ virtual void move();
/**
* Get public ID.
@@ -261,12 +263,12 @@ class MovingObject: public Object
Point mDst; /**< target coordinates */
Point mOld; /**< old coordinates */
unsigned short mSpeed; /**< speed */
- unsigned mSize; /**< radius of bounding circle */
std::list<PATH_NODE> mPath;
protected:
unsigned char mDirection; /**< Facing direction */
unsigned short mActionTime; /**< delay until next action */
+ unsigned mSize; /**< radius of bounding circle */
};
#endif // _TMWSERV_OBJECT_H_