summaryrefslogtreecommitdiff
path: root/src/net/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/playerhandler.cpp')
-rw-r--r--src/net/playerhandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp
index a5a2330b..0ea404ed 100644
--- a/src/net/playerhandler.cpp
+++ b/src/net/playerhandler.cpp
@@ -125,11 +125,18 @@ void PlayerHandler::handleMessage(MessageIn *msg)
current_npc = 0;
+ float scrollOffsetX = (x - player_node->mX) * 32;
+ float scrollOffsetY = (y - player_node->mY) * 32;
+
player_node->setAction(Being::STAND);
player_node->stopAttack();
player_node->mFrame = 0;
player_node->mX = x;
player_node->mY = y;
+
+ logger->log("Adjust scrolling by %d:%d", (int)scrollOffsetX, (int)scrollOffsetY);
+
+ engine->scrollBy(scrollOffsetX, scrollOffsetY);
}
break;