diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-29 19:53:14 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-29 19:53:14 -0400 |
commit | b30faa4c18fbbf804104e07c9d295bebf7d815ce (patch) | |
tree | 5a611e4baeb4704d109b48e13d6116143fb62a86 /src/net/tmwserv/beinghandler.cpp | |
parent | ec1c6bc0d44d0b6b94607d36a8cd28e6c4e484cd (diff) | |
download | mana-b30faa4c18fbbf804104e07c9d295bebf7d815ce.tar.gz mana-b30faa4c18fbbf804104e07c9d295bebf7d815ce.tar.bz2 mana-b30faa4c18fbbf804104e07c9d295bebf7d815ce.tar.xz mana-b30faa4c18fbbf804104e07c9d295bebf7d815ce.zip |
Some movement fixes for TMWServ build.
Looked pretty good so I removed annoying debug information.
Also should note that movement between two players is still off.
Diffstat (limited to 'src/net/tmwserv/beinghandler.cpp')
-rw-r--r-- | src/net/tmwserv/beinghandler.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/net/tmwserv/beinghandler.cpp b/src/net/tmwserv/beinghandler.cpp index 1ec13800..99491203 100644 --- a/src/net/tmwserv/beinghandler.cpp +++ b/src/net/tmwserv/beinghandler.cpp @@ -191,11 +191,6 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg) int dy = 0; int speed = 0; - printf("handleBeingsMoveMessage for %p (%s | %s)\n", - (void*) being, - (flags & MOVING_POSITION) ? "pos" : "", - (flags & MOVING_DESTINATION) ? "dest" : ""); - if (flags & MOVING_POSITION) { Uint16 sx2, sy2; @@ -235,7 +230,7 @@ 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) < 2 * 32 && + abs(being->getPixelY() - dy) < 16 && (dx != being->getDestination().x && dy != being->getDestination().y)) { being->setDestination(being->getPixelX(),being->getPixelY()); @@ -258,7 +253,7 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg) } else { - being->adjustCourse(sx, sy, dx, dy); + being->setDestination(sx, sy, dx, dy); } } } |