summaryrefslogtreecommitdiff
path: root/src/net/eathena/gamehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/gamehandler.cpp')
-rw-r--r--src/net/eathena/gamehandler.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index b8d0ecd8e..6caf57c20 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -173,7 +173,7 @@ void GameHandler::processMapAccountId(Net::MessageIn &msg)
msg.readInt32("account id");
}
-void GameHandler::processMapLogin(Net::MessageIn &msg) const
+void GameHandler::processMapLogin(Net::MessageIn &msg)
{
unsigned char direction;
uint16_t x, y;
@@ -188,8 +188,13 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
mLastHost &= 0xffffff;
- if (mNetwork)
- mNetwork->pauseDispatch();
+ GameHandler *const g = dynamic_cast<GameHandler*>(gameHandler);
+ if (g)
+ {
+ Network *const network = g->mNetwork;
+ if (network)
+ network->pauseDispatch();
+ }
// Switch now or we'll have problems
client->setState(STATE_GAME);
@@ -197,7 +202,7 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
localPlayer->setTileCoords(x, y);
}
-void GameHandler::processServerTick(Net::MessageIn &msg) const
+void GameHandler::processServerTick(Net::MessageIn &msg)
{
msg.readInt32("tick");
}