diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-02 03:12:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-02 03:12:14 +0300 |
commit | 40730c4fa73d403cf7284a76d9b26f7ec662afa4 (patch) | |
tree | 3bf9dce3ca6297a06193cdcc19cfdfa914fc48b2 /src/net/tmwa/gamehandler.cpp | |
parent | ab8c8cdae07d96cb18276a95b41ddb856c864958 (diff) | |
download | manaplus-40730c4fa73d403cf7284a76d9b26f7ec662afa4.tar.gz manaplus-40730c4fa73d403cf7284a76d9b26f7ec662afa4.tar.bz2 manaplus-40730c4fa73d403cf7284a76d9b26f7ec662afa4.tar.xz manaplus-40730c4fa73d403cf7284a76d9b26f7ec662afa4.zip |
Remove mNetwork field from MessageHandlers
Diffstat (limited to 'src/net/tmwa/gamehandler.cpp')
-rw-r--r-- | src/net/tmwa/gamehandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index a3af6118b..00537bf83 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -101,11 +101,11 @@ void GameHandler::mapLoadedEvent() const void GameHandler::connect() { - if (!mNetwork) + if (!Network::mInstance) return; BLOCK_START("GameHandler::connect") - mNetwork->connect(mapServer); + Network::mInstance->connect(mapServer); const Token &token = static_cast<LoginHandler*>(loginHandler)->getToken(); if (client->getState() == STATE_CONNECT_GAME) @@ -138,22 +138,22 @@ void GameHandler::connect() } */ // We get 4 useless bytes before the real answer comes in (what are these?) - mNetwork->skip(4); + Network::mInstance->skip(4); BLOCK_END("GameHandler::connect") } bool GameHandler::isConnected() const { - if (!mNetwork) + if (!Network::mInstance) return false; - return mNetwork->isConnected(); + return Network::mInstance->isConnected(); } void GameHandler::disconnect() { BLOCK_START("GameHandler::disconnect") - if (mNetwork) - mNetwork->disconnect(); + if (Network::mInstance) + Network::mInstance->disconnect(); BLOCK_END("GameHandler::disconnect") } |