From efb2f46fc326117d77851fe588784ff869e2935f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Oct 2014 19:12:04 +0300 Subject: Add static in gamehandler. --- src/net/tmwa/gamehandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa/gamehandler.cpp') diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index 4d6d1998f..65ff13fb8 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -168,7 +168,7 @@ void GameHandler::disconnect2() const createOutPacket(CMSG_CLIENT_DISCONNECT); } -void GameHandler::processMapLogin(Net::MessageIn &msg) const +void GameHandler::processMapLogin(Net::MessageIn &msg) { unsigned char direction; uint16_t x, y; @@ -180,8 +180,13 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const mLastHost &= 0xffffff; - if (mNetwork) - mNetwork->pauseDispatch(); + GameHandler *const g = dynamic_cast(gameHandler); + if (g) + { + Network *const network = g->mNetwork; + if (network) + network->pauseDispatch(); + } // Switch now or we'll have problems client->setState(STATE_GAME); -- cgit v1.2.3-70-g09d2