summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/gamehandler.cpp8
-rw-r--r--src/net/ea/gamehandler.h2
2 files changed, 9 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
diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h
index 93773e33d..c0b4286ce 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/ea/gamehandler.h
@@ -62,6 +62,8 @@ class GameHandler : public Net::GameHandler, public Listener
virtual void processMapQuitResponse(Net::MessageIn &msg);
+ virtual void clear();
+
protected:
std::string mMap;
int mCharID; /// < Saved for map-server switching