diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2009-07-01 20:39:28 -0400 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2009-07-01 20:41:17 -0400 |
commit | 0bca1b9756a93d876cbf4a411b47634b87775162 (patch) | |
tree | 50eb8a593b1499c694add8e582823dc78b1459cb /src/net | |
parent | cc8faa31bfae9f7bbce453a4ae69ef3d6eacbb96 (diff) | |
download | mana-client-0bca1b9756a93d876cbf4a411b47634b87775162.tar.gz mana-client-0bca1b9756a93d876cbf4a411b47634b87775162.tar.bz2 mana-client-0bca1b9756a93d876cbf4a411b47634b87775162.tar.xz mana-client-0bca1b9756a93d876cbf4a411b47634b87775162.zip |
Remove complex path finding for players. Add a simple path finding algorithm to map.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/tmwserv/beinghandler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/tmwserv/beinghandler.cpp b/src/net/tmwserv/beinghandler.cpp index 99491203..7076ff8e 100644 --- a/src/net/tmwserv/beinghandler.cpp +++ b/src/net/tmwserv/beinghandler.cpp @@ -231,13 +231,14 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg) // If being is a player, and he only moves a little, its ok to be a little out of sync if (being->getType() == Being::PLAYER && abs(being->getPixelX() - dx) + abs(being->getPixelY() - dy) < 16 && - (dx != being->getDestination().x && dy != being->getDestination().y)) + (dx != being->getDestination().x && + dy != being->getDestination().y)) { being->setDestination(being->getPixelX(),being->getPixelY()); continue; } if (abs(being->getPixelX() - sx) + - abs(being->getPixelY() - sy) > 10 * 32) + abs(being->getPixelY() - sy) > 10 * 32) { // Too large a desynchronization. being->setPosition(sx, sy); |