bugfixes for headless mode (when admin picks things that server doesn't have).. added a 2 second delay timer for sending out changes

This commit is contained in:
Mark Vejvoda
2011-10-22 00:19:38 +00:00
parent 5ee20018d8
commit bd2206f51b
4 changed files with 96 additions and 37 deletions

View File

@@ -53,7 +53,7 @@ ClientInterface::ClientInterface() : GameNetworkInterface() {
launchGame= false;
introDone= false;
playerIndex= -1;
gameSettingsReceived=false;
setGameSettingsReceived(false);
gotIntro = false;
lastNetworkCommandListSendTime = 0;
currentFrameCount = 0;
@@ -485,7 +485,7 @@ void ClientInterface::updateLobby() {
launchGame= true;
}
else if(networkMessageLaunch.getMessageType() == nmtBroadCastSetup) {
gameSettingsReceived=true;
setGameSettingsReceived(true);
}
}
}
@@ -1272,5 +1272,10 @@ void ClientInterface::broadcastGameStart(const GameSettings *gameSettings) {
sendMessage(&networkMessageLaunch);
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
}
void ClientInterface::setGameSettingsReceived(bool value) {
//printf("In [%s:%s] Line: %d gameSettingsReceived = %d value = %d, gameSettingsReceivedCount = %d\n",__FILE__,__FUNCTION__,__LINE__,gameSettingsReceived,value,gameSettingsReceivedCount);
gameSettingsReceived = value;
gameSettingsReceivedCount++;
}
}}//end namespace