diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-09-02 14:24:56 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-09-02 14:24:56 +0000 |
commit | 58c4bb86240a04e8e76dd8a5d68a053735c2a71c (patch) | |
tree | 8755cecc0e5e0e4015645e75a7501a610f7413cb /src | |
parent | 21866bc51f75ebc1550a225dbe45d0bdca570b01 (diff) | |
download | manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.gz manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.bz2 manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.tar.xz manaserv-58c4bb86240a04e8e76dd8a5d68a053735c2a71c.zip |
Fixed last step detection.
Diffstat (limited to 'src')
-rw-r--r-- | src/state.cpp | 7 |
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; |