- changed disconnected playername to: *AI* - playername
This commit is contained in:
parent
b965343496
commit
c187d4d014
|
@ -831,10 +831,11 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
|||
int factionIndex = networkCommand->getUnitId();
|
||||
int playerStatus = networkCommand->getCommandTypeId();
|
||||
|
||||
if(playerStatus == 1) {
|
||||
GameSettings *settings = world->getGameSettingsPtr();
|
||||
if(playerStatus == 1) {
|
||||
settings->setNetworkPlayerGameStatus(factionIndex,1);
|
||||
}
|
||||
this->world->getStats()->setPlayerName(factionIndex,settings->getNetworkPlayerName(factionIndex));
|
||||
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] found nctPlayerStatusChange\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
|
|
@ -839,7 +839,7 @@ void Game::init(bool initForPreviewOnly) {
|
|||
Map *map= world.getMap();
|
||||
NetworkManager &networkManager= NetworkManager::getInstance();
|
||||
|
||||
GameSettings::playerDisconnectedText = "*" + lang.get("Disconnect") + "* - ";
|
||||
GameSettings::playerDisconnectedText = "*" + lang.get("AI") + "* ";
|
||||
|
||||
if(map == NULL) {
|
||||
throw megaglest_runtime_error("map == NULL");
|
||||
|
|
|
@ -1503,7 +1503,8 @@ void MenuStateConnectedGame::loadGameSettings(GameSettings *gameSettings) {
|
|||
AIPlayerCount++;
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, playername is AI (blank)\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i);
|
||||
|
||||
gameSettings->setNetworkPlayerName(slotIndex, string("AI") + intToStr(AIPlayerCount));
|
||||
Lang &lang= Lang::getInstance();
|
||||
gameSettings->setNetworkPlayerName(slotIndex, lang.get("AI") + intToStr(AIPlayerCount));
|
||||
labelPlayerNames[i].setText("");
|
||||
}
|
||||
|
||||
|
|
|
@ -3091,7 +3091,8 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
|||
AIPlayerCount++;
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, playername is AI (blank)\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i);
|
||||
|
||||
gameSettings->setNetworkPlayerName(slotIndex, string("AI") + intToStr(AIPlayerCount));
|
||||
Lang &lang= Lang::getInstance();
|
||||
gameSettings->setNetworkPlayerName(slotIndex, lang.get("AI") + intToStr(AIPlayerCount));
|
||||
labelPlayerNames[i].setText("");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue