diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-01-09 12:09:01 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-01-09 12:09:01 +0100 |
commit | 8ff3e6674c1d4fc05fc1ba87f42484689fca0879 (patch) | |
tree | 0c05e984fe61d9e28e9bf014d6b4a70645d27a7e /src/game-server/being.cpp | |
parent | 57701ac70f2b81e11eedb4c01f680e46c1abadb2 (diff) | |
download | manaserv-8ff3e6674c1d4fc05fc1ba87f42484689fca0879.tar.gz manaserv-8ff3e6674c1d4fc05fc1ba87f42484689fca0879.tar.bz2 manaserv-8ff3e6674c1d4fc05fc1ba87f42484689fca0879.tar.xz manaserv-8ff3e6674c1d4fc05fc1ba87f42484689fca0879.zip |
Removed the superfluous point struct.
It was too close from the Position class and it leads to
making the server handle one or another type through the
code. Still bugged me many times while making changes.
Reviewed-by: Jaxad.
Diffstat (limited to 'src/game-server/being.cpp')
-rw-r--r-- | src/game-server/being.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index c0fc65e9..65736774 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -270,16 +270,17 @@ void Being::move() setAction(WALK); - Position prev(tileSX, tileSY); + Point prev(tileSX, tileSY); Point pos; do { - Position next = mPath.front(); + Point next = mPath.front(); mPath.pop_front(); // SQRT2 is used for diagonal movement. mMoveTime += (prev.x == next.x || prev.y == next.y) ? getModifiedAttribute(ATTR_MOVE_SPEED_RAW) : getModifiedAttribute(ATTR_MOVE_SPEED_RAW) * SQRT2; + if (mPath.empty()) { // skip last tile center |