diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 473ce5f3..d7daa617 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -183,7 +183,7 @@ void stackdumper(unsigned int type, EXCEPTION_POINTERS *ep) { class ExceptionHandler: public PlatformExceptionHandler{ public: virtual void handle() { - string msg = "#1 An error ocurred and " + string(GameConstants::application_name) + " will close.\nPlease report this bug to "+mailString; + string msg = "#1 An error occurred and " + string(GameConstants::application_name) + " will close.\nPlease report this bug to "+mailString; #ifdef WIN32 msg += ", attaching the generated " + getCrashDumpFileName()+ " file."; #endif @@ -366,7 +366,7 @@ public: } } else { - string err = "#2 An error ocurred and " + + string err = "#2 An error occurred and " + string(GameConstants::application_name) + " will close.\nError msg = [" + errMsg + diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 7c9032da..08fe3d15 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1339,7 +1339,9 @@ void MenuStateCustomGame::render() { } } - renderer.renderChatManager(&chatManager); + if(hasNetworkGameSettings() == true) { + renderer.renderChatManager(&chatManager); + } renderer.renderConsole(&console,showFullConsole,true); } catch(const std::exception &ex) { @@ -2635,7 +2637,9 @@ void MenuStateCustomGame::keyDown(char key) { } else { //send key to the chat manager - chatManager.keyDown(key); + if(hasNetworkGameSettings() == true) { + chatManager.keyDown(key); + } if(chatManager.getEditEnabled() == false) { Config &configKeys = Config::getInstance(std::pair(cfgMainKeys,cfgUserKeys)); @@ -2692,19 +2696,24 @@ void MenuStateCustomGame::keyPress(char c) { } } else { - chatManager.keyPress(c); + if(hasNetworkGameSettings() == true) { + chatManager.keyPress(c); + } } } void MenuStateCustomGame::keyUp(char key) { if(activeInputLabel==NULL) { - chatManager.keyUp(key); - + if(hasNetworkGameSettings() == true) { + chatManager.keyUp(key); + } Config &configKeys = Config::getInstance(std::pair(cfgMainKeys,cfgUserKeys)); if(chatManager.getEditEnabled()) { //send key to the chat manager - chatManager.keyUp(key); + if(hasNetworkGameSettings() == true) { + chatManager.keyUp(key); + } } else if(key == configKeys.getCharKey("ShowFullConsole")) { showFullConsole= false; diff --git a/source/glest_game/menu/menu_state_masterserver.h b/source/glest_game/menu/menu_state_masterserver.h index cf984c12..75cf2fc9 100644 --- a/source/glest_game/menu/menu_state_masterserver.h +++ b/source/glest_game/menu/menu_state_masterserver.h @@ -120,6 +120,7 @@ public: virtual void keyUp(char key); virtual void simpleTask(BaseThread *callingThread); + virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); } static void setDisplayMessageFunction(DisplayMessageFunction pDisplayMessage) { pCB_DisplayMessage = pDisplayMessage; }