summaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-09-02 14:24:56 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-09-02 14:24:56 +0000
commit58c4bb86240a04e8e76dd8a5d68a053735c2a71c (patch)
tree8755cecc0e5e0e4015645e75a7501a610f7413cb /src/state.cpp
parent21866bc51f75ebc1550a225dbe45d0bdca570b01 (diff)
downloadmanaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.gz
manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.bz2
manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.xz
manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.zip
Fixed last step detection.
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 5ce00dd9..5471e121 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -155,10 +155,15 @@ State::update()
moving inside p's range. Report o's movements. */
Point od = (*o)->getDestination();
- if (on.x != od.x || on.y != od.y || on.x != os.x || on.y != os.y)
+ if (on.x != od.x || on.y != od.y)
{
flags |= MOVING_POSITION;
}
+ else
+ {
+ // no need to synchronize on the very last step
+ flags |= MOVING_DESTINATION;
+ }
// TODO: updates destination only on changes.
flags |= MOVING_DESTINATION;