From b88d51c3c6f7bef2b211f1f81f46d26de655d54e Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 12 Oct 2011 03:07:00 +0000 Subject: [PATCH] - bugfix to not say teammode when not in game --- source/glest_game/game/chat_manager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/glest_game/game/chat_manager.cpp b/source/glest_game/game/chat_manager.cpp index 00216ac47..3431414dd 100644 --- a/source/glest_game/game/chat_manager.cpp +++ b/source/glest_game/game/chat_manager.cpp @@ -241,10 +241,9 @@ void ChatManager::updateNetwork() { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] got nmtText [%s] for team = %d\n",__FILE__,__FUNCTION__,msg.chatText.c_str(),teamIndex); if(teamIndex == -1 || teamIndex == thisTeamIndex) { - //console->addLine(msg.chatSender + ": " + msg.chatText, true, msg.chatPlayerIndex); - if(msg.targetLanguage == "" || lang.isLanguageLocal(msg.targetLanguage) == true) { - console->addLine(msg.chatText, true, msg.chatPlayerIndex,Vec3f(1.f, 1.f, 1.f),teamIndex == thisTeamIndex); + bool teamMode = (teamIndex != -1 && teamIndex == thisTeamIndex); + console->addLine(msg.chatText, true, msg.chatPlayerIndex,Vec3f(1.f, 1.f, 1.f),teamMode); } SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Added text to console\n",__FILE__,__FUNCTION__);