fix for delayed playername correction ( which was rising the alarmsound too )
This commit is contained in:
parent
a4dab7d1d7
commit
2fde01b6ed
|
@ -1506,7 +1506,7 @@ void MenuStateConnectedGame::loadGameSettings(GameSettings *gameSettings) {
|
||||||
|
|
||||||
if(ct != ctClosed) {
|
if(ct != ctClosed) {
|
||||||
int slotIndex = factionCount;
|
int slotIndex = factionCount;
|
||||||
|
ControlType oldControlType=gameSettings->getFactionControl(slotIndex);
|
||||||
gameSettings->setFactionControl(slotIndex, ct);
|
gameSettings->setFactionControl(slotIndex, ct);
|
||||||
if(ct == ctHuman) {
|
if(ct == ctHuman) {
|
||||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, slotIndex = %d, getHumanPlayerName(i) [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,slotIndex,getHumanPlayerName(i).c_str());
|
//if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, slotIndex = %d, getHumanPlayerName(i) [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,slotIndex,getHumanPlayerName(i).c_str());
|
||||||
|
@ -1534,6 +1534,9 @@ void MenuStateConnectedGame::loadGameSettings(GameSettings *gameSettings) {
|
||||||
//printf("!!! setStartLocationIndex #1 slotIndex = %d, i = %d\n",slotIndex, i);
|
//printf("!!! setStartLocationIndex #1 slotIndex = %d, i = %d\n",slotIndex, i);
|
||||||
|
|
||||||
if(listBoxControls[i].getSelectedItemIndex() == ctNetwork || listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
|
if(listBoxControls[i].getSelectedItemIndex() == ctNetwork || listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
|
||||||
|
if(oldControlType!=ctNetwork && oldControlType!=ctNetworkUnassigned ){
|
||||||
|
gameSettings->setNetworkPlayerName(slotIndex,"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (listBoxControls[i].getSelectedItemIndex() != ctHuman) {
|
else if (listBoxControls[i].getSelectedItemIndex() != ctHuman) {
|
||||||
AIPlayerCount++;
|
AIPlayerCount++;
|
||||||
|
@ -2616,7 +2619,8 @@ void MenuStateConnectedGame::update() {
|
||||||
GameSettings *gameSettings = clientInterface->getGameSettingsPtr();
|
GameSettings *gameSettings = clientInterface->getGameSettingsPtr();
|
||||||
int currentConnectionCount=0;
|
int currentConnectionCount=0;
|
||||||
for(int i=0; i < GameConstants::maxPlayers; ++i) {
|
for(int i=0; i < GameConstants::maxPlayers; ++i) {
|
||||||
if(gameSettings->getNetworkPlayerName(i) != "" &&
|
if(gameSettings->getFactionControl(i)==ctNetwork &&
|
||||||
|
gameSettings->getNetworkPlayerName(i) != "" &&
|
||||||
gameSettings->getNetworkPlayerName(i) != GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME)
|
gameSettings->getNetworkPlayerName(i) != GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME)
|
||||||
{
|
{
|
||||||
currentConnectionCount++;
|
currentConnectionCount++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user