- fix min player for headless game message
This commit is contained in:
parent
a7fe72a46c
commit
c5ac0cc8e3
|
@ -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);
|
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(rule->test()) {
|
||||||
if(outputAIBehaviourToConsole()) printf("\n\nYYYYY Executing AI Faction # %d RULE Name[%s]\n\n",aiInterface->getFactionIndex(),rule->getName().c_str());
|
if(outputAIBehaviourToConsole()) printf("\n\nYYYYY Executing AI Faction # %d RULE Name[%s]\n\n",aiInterface->getFactionIndex(),rule->getName().c_str());
|
||||||
|
|
|
@ -461,6 +461,8 @@ void ChatManager::updateNetwork() {
|
||||||
playerName = this->manualPlayerNameOverride;
|
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(StartsWith(msg.chatText,"*")){
|
||||||
if(msg.chatText.find(playerName) != string::npos){
|
if(msg.chatText.find(playerName) != string::npos){
|
||||||
CoreData &coreData= CoreData::getInstance();
|
CoreData &coreData= CoreData::getInstance();
|
||||||
|
|
|
@ -1965,6 +1965,9 @@ void Renderer::renderConsoleLine3D(int lineIndex, int xPosition, int yPosition,
|
||||||
if(playerName != lineInfo->originalPlayerName && lineInfo->originalPlayerName != "") {
|
if(playerName != lineInfo->originalPlayerName && lineInfo->originalPlayerName != "") {
|
||||||
playerName = 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());
|
//printf("playerName [%s], line [%s]\n",playerName.c_str(),line.c_str());
|
||||||
|
|
||||||
//string headerLine = "*" + playerName + ":";
|
//string headerLine = "*" + playerName + ":";
|
||||||
|
|
|
@ -1564,6 +1564,8 @@ bool ClientInterface::shouldDiscardNetworkMessage(NetworkMessageType networkMess
|
||||||
string ClientInterface::getHumanPlayerName(int index) {
|
string ClientInterface::getHumanPlayerName(int index) {
|
||||||
string result = Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str());
|
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 || gameSettings.getThisFactionIndex() >= 0) {
|
||||||
if(index < 0) {
|
if(index < 0) {
|
||||||
index = gameSettings.getThisFactionIndex();
|
index = gameSettings.getThisFactionIndex();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user