diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-07 17:46:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-07 17:46:31 +0300 |
commit | a80e10b7ba9771dca3fcddb3f0182a5aa1825226 (patch) | |
tree | 85f7ad40f3bc0d030e2dab57cb2af65dfa04cf33 /src/net/ea/gamehandler.cpp | |
parent | f8fcfcfef1e5a8cbda66328664f41b3f9aa2a773 (diff) | |
download | manaverse-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.gz manaverse-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.bz2 manaverse-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.xz manaverse-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.zip |
Fix server switch incorrect map loading.
Diffstat (limited to 'src/net/ea/gamehandler.cpp')
-rw-r--r-- | src/net/ea/gamehandler.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 3e9e36541..eaed1ec5d 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -48,7 +48,7 @@ void GameHandler::processEvent(Channels channel, { if (event.getName() == EVENT_ENGINESINITALIZED) { - if (mMap != "") + if (!mMap.empty()) Game::instance()->changeMap(mMap); } else if (event.getName() == EVENT_MAPLOADED) @@ -99,4 +99,10 @@ void GameHandler::processMapQuitResponse(Net::MessageIn &msg) new OkDialog(_("Game"), _("Request to quit denied!"), DIALOG_ERROR); } +void GameHandler::clear() +{ + mMap.clear(); + mCharID = 0; +} + } // namespace Ea |