diff options
-rw-r--r-- | src/map.cpp | 2 | ||||
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index f1d27e4f..8b1d7b26 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -620,7 +620,7 @@ bool Map::contains(int x, int y) const bool Map::containsPixel(int x, int y) const { - return contains(x ? x / mTileWidth : 0, y ? y / mTileHeight : 0); + return contains(x / mTileWidth, y / mTileHeight); } MetaTile *Map::getMetaTile(int x, int y) const diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index ac4a2404..cff0ff71 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -129,11 +129,11 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) BeingDirection direction = (BeingDirection)msg.readInt8(); Being *being; - if(!Game::instance()->getCurrentMap()->containsPixel(px ,py)) + if (!Game::instance()->getCurrentMap()->containsPixel(px, py)) { - logger->log("Warning: Received GPMSG_BEING_ENTER for being id " - "%i with position outside the map boundaries " - "(x = %i, y = %i)", id, px, py); + logger->log("Warning: Received GPMSG_BEING_ENTER for being id %i " + "with position outside the map boundaries " + "(x = %i, y = %i)", id, px, py); return; } @@ -242,7 +242,7 @@ void BeingHandler::handleBeingsMoveMessage(Net::MessageIn &msg) logger->log("Warning: Received GPMSG_BEINGS_MOVE for being id " "%i with position outside the map boundaries " "(x = %i, y = %i)", id, sx, sy); - return; + continue; } Vector serverPos(sx, sy); @@ -258,7 +258,7 @@ void BeingHandler::handleBeingsMoveMessage(Net::MessageIn &msg) logger->log("Warning: Received GPMSG_BEINGS_MOVE for being id " "%i with destination outside the map boundaries " "(x = %i, y = %i)", id, dx, dy); - return; + continue; } being->setDestination(dx, dy); |