- bugfix for in game joining

This commit is contained in:
Mark Vejvoda 2013-02-16 19:26:17 +00:00
parent 45dc4c0e5d
commit cfe0f6bb55
2 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,7 @@ ServerInterface::ServerInterface(bool publishEnabled) :GameNetworkInterface() {
allowInGameConnections = false; allowInGameConnections = false;
pauseForInGameConnection = false; pauseForInGameConnection = false;
unPauseForInGameConnection = false; unPauseForInGameConnection = false;
gameStarted = false;
serverSynchAccessor = new Mutex(); serverSynchAccessor = new Mutex();
switchSetupRequestsSynchAccessor = new Mutex(); switchSetupRequestsSynchAccessor = new Mutex();
@ -2256,13 +2257,15 @@ bool ServerInterface::launchGame(const GameSettings *gameSettings) {
ftpServer = NULL; ftpServer = NULL;
} }
} }
gameStarted = true;
} }
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
return bOkToStart; return bOkToStart;
} }
void ServerInterface::checkListenerSlots() { void ServerInterface::checkListenerSlots() {
if(allowInGameConnections == true) { if(gameStarted == true && allowInGameConnections == true) {
bool useInGameBlockingClientSockets = Config::getInstance().getBool("EnableInGameBlockingSockets","true"); bool useInGameBlockingClientSockets = Config::getInstance().getBool("EnableInGameBlockingSockets","true");
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);

View File

@ -102,6 +102,7 @@ private:
bool pauseForInGameConnection; bool pauseForInGameConnection;
bool startInGameConnectionLaunch; bool startInGameConnectionLaunch;
bool unPauseForInGameConnection; bool unPauseForInGameConnection;
bool gameStarted;
public: public:
ServerInterface(bool publishEnabled); ServerInterface(bool publishEnabled);