diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-25 20:26:46 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-25 20:26:46 +0000 |
commit | 7354937c4b452a2c413f0827d6f381e125e6a687 (patch) | |
tree | 84792355a26f5b4c38996b16c12df090fa8f8926 /src/game-server/movingobject.hpp | |
parent | 6ba73b56b72bf53d4976fd1423490e682542b6d2 (diff) | |
download | manaserv-7354937c4b452a2c413f0827d6f381e125e6a687.tar.gz manaserv-7354937c4b452a2c413f0827d6f381e125e6a687.tar.bz2 manaserv-7354937c4b452a2c413f0827d6f381e125e6a687.tar.xz manaserv-7354937c4b452a2c413f0827d6f381e125e6a687.zip |
Added being speed to protocol.
Diffstat (limited to 'src/game-server/movingobject.hpp')
-rw-r--r-- | src/game-server/movingobject.hpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/game-server/movingobject.hpp b/src/game-server/movingobject.hpp index b1f4a33a..2763c530 100644 --- a/src/game-server/movingobject.hpp +++ b/src/game-server/movingobject.hpp @@ -41,8 +41,8 @@ class MovingObject : public Object MovingObject(int type, int id) : Object(type), mPublicID(id), - mDirection(0), - mActionTime(0) + mActionTime(0), + mDirection(0) {} /** @@ -77,25 +77,31 @@ class MovingObject : public Object /** * Gets object direction. */ - unsigned char getDirection() const + int getDirection() const { return mDirection; } /** + * Gets object speed. + */ + int getSpeed() const + { return mSpeed; } + + /** * Sets object speed. */ - void setSpeed(unsigned s) + void setSpeed(int s) { mSpeed = s; } /** * Sets object bounding circle radius. */ - void setSize(unsigned s) + void setSize(int s) { mSize = s; } /** * Gets object bounding circle radius. */ - unsigned getSize() + int getSize() { return mSize; } /** @@ -127,9 +133,9 @@ class MovingObject : public Object std::list<PATH_NODE> mPath; protected: - unsigned char mDirection; /**< Facing direction. */ unsigned short mActionTime; /**< Delay until next action. */ - unsigned mSize; /**< Radius of bounding circle. */ + unsigned char mDirection; /**< Facing direction. */ + unsigned char mSize; /**< Radius of bounding circle. */ }; #endif // _TMWSERV_MOVINGOBJECT_H_ |