summaryrefslogtreecommitdiff
path: root/src/net/ea/gamehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-07 17:46:31 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-07 17:46:31 +0300
commita80e10b7ba9771dca3fcddb3f0182a5aa1825226 (patch)
tree85f7ad40f3bc0d030e2dab57cb2af65dfa04cf33 /src/net/ea/gamehandler.cpp
parentf8fcfcfef1e5a8cbda66328664f41b3f9aa2a773 (diff)
downloadmv-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.gz
mv-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.bz2
mv-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.tar.xz
mv-a80e10b7ba9771dca3fcddb3f0182a5aa1825226.zip
Fix server switch incorrect map loading.
Diffstat (limited to 'src/net/ea/gamehandler.cpp')
-rw-r--r--src/net/ea/gamehandler.cpp8
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