diff --git a/source/glest_game/ai/ai.cpp b/source/glest_game/ai/ai.cpp index f42f29f6..a2eaca88 100644 --- a/source/glest_game/ai/ai.cpp +++ b/source/glest_game/ai/ai.cpp @@ -391,7 +391,7 @@ void Ai::update() { if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld [ruleIdx = %d, before rule->test()]\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),ruleIdx); - //printf("???? Testing AI Faction # %d RULE Name[%s]\n",aiInterface->getFactionIndex(),rule->getName().c_str()); + //printf("Testing AI Faction # %d RULE Name[%s]\n",aiInterface->getFactionIndex(),rule->getName().c_str()); if(rule->test()) { if(outputAIBehaviourToConsole()) printf("\n\nYYYYY Executing AI Faction # %d RULE Name[%s]\n\n",aiInterface->getFactionIndex(),rule->getName().c_str()); diff --git a/source/glest_game/game/chat_manager.cpp b/source/glest_game/game/chat_manager.cpp index 003b0599..91d64a0d 100644 --- a/source/glest_game/game/chat_manager.cpp +++ b/source/glest_game/game/chat_manager.cpp @@ -461,6 +461,8 @@ void ChatManager::updateNetwork() { playerName = this->manualPlayerNameOverride; } + //printf("Network chat msg from: [%d - %s] [%s]\n",msg.chatPlayerIndex,gameNetworkInterface->getHumanPlayerName().c_str(),this->manualPlayerNameOverride.c_str()); + if(StartsWith(msg.chatText,"*")){ if(msg.chatText.find(playerName) != string::npos){ CoreData &coreData= CoreData::getInstance(); diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 3505db64..7389c339 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -1965,6 +1965,9 @@ void Renderer::renderConsoleLine3D(int lineIndex, int xPosition, int yPosition, if(playerName != lineInfo->originalPlayerName && lineInfo->originalPlayerName != "") { playerName = lineInfo->originalPlayerName; } + if(playerName == GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME) { + playerName = lang.get("SystemUser"); + } //printf("playerName [%s], line [%s]\n",playerName.c_str(),line.c_str()); //string headerLine = "*" + playerName + ":"; diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index 9276b7b0..6fb6a972 100644 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -1564,6 +1564,8 @@ bool ClientInterface::shouldDiscardNetworkMessage(NetworkMessageType networkMess string ClientInterface::getHumanPlayerName(int index) { string result = Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str()); + //printf("Client getHumanPlayerName index = %d, gameSettings.getThisFactionIndex() = %d\n",index,gameSettings.getThisFactionIndex()); + if(index >= 0 || gameSettings.getThisFactionIndex() >= 0) { if(index < 0) { index = gameSettings.getThisFactionIndex();