summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-17 19:12:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-17 21:22:47 +0300
commitefb2f46fc326117d77851fe588784ff869e2935f (patch)
treeba483c230a64e16aefa89f9717d6915d267e2f01 /src/net/tmwa
parent661dec0f325a01427911598fb6b7e24754a3a1b5 (diff)
downloadmanaverse-efb2f46fc326117d77851fe588784ff869e2935f.tar.gz
manaverse-efb2f46fc326117d77851fe588784ff869e2935f.tar.bz2
manaverse-efb2f46fc326117d77851fe588784ff869e2935f.tar.xz
manaverse-efb2f46fc326117d77851fe588784ff869e2935f.zip
Add static in gamehandler.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/gamehandler.cpp11
-rw-r--r--src/net/tmwa/gamehandler.h2
2 files changed, 9 insertions, 4 deletions
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*>(gameHandler);
+ if (g)
+ {
+ Network *const network = g->mNetwork;
+ if (network)
+ network->pauseDispatch();
+ }
// Switch now or we'll have problems
client->setState(STATE_GAME);
diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h
index b3736289e..7629425a3 100644
--- a/src/net/tmwa/gamehandler.h
+++ b/src/net/tmwa/gamehandler.h
@@ -57,7 +57,7 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler
{ return false; }
protected:
- void processMapLogin(Net::MessageIn &msg) const;
+ static void processMapLogin(Net::MessageIn &msg);
};
} // namespace TmwAthena