summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-02 18:58:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-02 18:58:51 +0300
commit691703127f7f35e8b954782ddb7ff613c478bedb (patch)
tree5599818e8e26138fbcbec82823eab751253acc93 /src/game.cpp
parentc73d1eddfd143dfbd78f078487601d650c931752 (diff)
downloadmv-691703127f7f35e8b954782ddb7ff613c478bedb.tar.gz
mv-691703127f7f35e8b954782ddb7ff613c478bedb.tar.bz2
mv-691703127f7f35e8b954782ddb7ff613c478bedb.tar.xz
mv-691703127f7f35e8b954782ddb7ff613c478bedb.zip
Collect asserts before creating chat window
and after show all collected asserts in debug chat tab.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5af1a8a67..9906b8cf1 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -131,6 +131,7 @@
#include "utils/naclmessages.h"
#endif // __native_client__
+#include "listeners/assertlistener.h"
#include "listeners/errorlistener.h"
#ifdef TMWA_SUPPORT
@@ -275,6 +276,13 @@ static void createGuiWindows()
"#Debug", ChatTabType::DEBUG);
debugChatTab->setAllowHighlight(false);
+ if (assertListener)
+ {
+ const StringVect &messages = assertListener->getMessages();
+ FOR_EACH (StringVectCIter, it, messages)
+ debugChatTab->chatLog(*it, ChatMsgType::BY_SERVER);
+ delete2(assertListener);
+ }
if (config.getBoolValue("enableTradeTab"))
chatWindow->addSpecialChannelTab(TRADE_CHANNEL, false);
else