summaryrefslogtreecommitdiff
path: root/src/game-server/object.hpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-01 20:12:27 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-01 20:12:27 +0000
commit20557328544d2b81b9bb0a4bfa1bae846ac960ab (patch)
tree18b50be88d2a469b25f41842b3397c4845496f7c /src/game-server/object.hpp
parent7d55d241bd5828f673a89dd49c5470aabcf52abd (diff)
downloadmanaserv-20557328544d2b81b9bb0a4bfa1bae846ac960ab.tar.gz
manaserv-20557328544d2b81b9bb0a4bfa1bae846ac960ab.tar.bz2
manaserv-20557328544d2b81b9bb0a4bfa1bae846ac960ab.tar.xz
manaserv-20557328544d2b81b9bb0a4bfa1bae846ac960ab.zip
Added caching of paths (patch by Rogier Polak).
Diffstat (limited to 'src/game-server/object.hpp')
-rw-r--r--src/game-server/object.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game-server/object.hpp b/src/game-server/object.hpp
index 498680e4..47d9a7d0 100644
--- a/src/game-server/object.hpp
+++ b/src/game-server/object.hpp
@@ -27,6 +27,7 @@
#include <vector>
#include "point.h"
+#include "game-server/map.hpp"
// Object type enumeration
enum
@@ -197,7 +198,7 @@ class MovingObject: public Object
* Sets the destination coordinates of the object.
*/
void setDestination(Point dst)
- { mDst = dst; raiseUpdateFlags(NEW_DESTINATION); }
+ { mDst = dst; raiseUpdateFlags(NEW_DESTINATION); mPath.clear(); }
/**
* Gets the old coordinates of the object.
@@ -249,6 +250,7 @@ class MovingObject: public Object
Point mDst; /**< target coordinates */
Point mOld; /**< old coordinates */
unsigned short mSpeed; /**< speed */
+ std::list<PATH_NODE> mPath;
protected:
unsigned char mDirection; /**< Facing direction */