summaryrefslogtreecommitdiff
path: root/src/net/playerhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-08-28 18:01:15 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-08-28 18:01:15 +0000
commitb506fe0ff8a2039167aa7c349087af4dd03e1921 (patch)
tree36989bca6fa259815f92e1d3553b4cc97d8f8133 /src/net/playerhandler.cpp
parentb98b6256262da9aafd9e8e1f93744db321d4d1ad (diff)
downloadMana-b506fe0ff8a2039167aa7c349087af4dd03e1921.tar.gz
Mana-b506fe0ff8a2039167aa7c349087af4dd03e1921.tar.bz2
Mana-b506fe0ff8a2039167aa7c349087af4dd03e1921.tar.xz
Mana-b506fe0ff8a2039167aa7c349087af4dd03e1921.zip
Applied patch put together by Jaxad0127 with changes from the Aethyra project.
Improves compatibility with the newer version of eAthena and works around an initialization bug.
Diffstat (limited to 'src/net/playerhandler.cpp')
-rw-r--r--src/net/playerhandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp
index 2502c144..463868db 100644
--- a/src/net/playerhandler.cpp
+++ b/src/net/playerhandler.cpp
@@ -123,6 +123,12 @@ void PlayerHandler::handleMessage(MessageIn *msg)
logger->log("Warping to %s (%d, %d)", mapPath.c_str(), x, y);
+ /*
+ * We must clear the local player's target *before* the call
+ * to changeMap, as it deletes all beings.
+ */
+ player_node->stopAttack();
+
// Switch the actual map, deleting the previous one
engine->changeMap(mapPath);
@@ -132,7 +138,6 @@ void PlayerHandler::handleMessage(MessageIn *msg)
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;