- attempt #1 to support 'keeping' connected clients in the lobby when the map changes and slots would normally disconnect

This commit is contained in:
Mark Vejvoda
2011-09-01 21:54:31 +00:00
parent 4a5a7f010d
commit 0a2c929fea
5 changed files with 275 additions and 88 deletions

View File

@@ -708,9 +708,13 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
case nmtSwitchSetupRequest:
{
//printf("Got nmtSwitchSetupRequest A\n");
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] got nmtSwitchSetupRequest gotIntro = %d\n",__FILE__,__FUNCTION__,__LINE__,gotIntro);
if(gotIntro == true) {
//printf("Got nmtSwitchSetupRequest B\n");
SwitchSetupRequest switchSetupRequest;
if(receiveMessage(&switchSetupRequest)) {
static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__);
@@ -726,6 +730,9 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
this->name = switchSetupRequest.getNetworkPlayerName();
this->playerLanguage = switchSetupRequest.getNetworkPlayerLanguage();
//printf("Got nmtSwitchSetupRequest C\n");
//printf("In [%s::%s Line %d] networkPlayerName [%s]\n",__FILE__,__FUNCTION__,__LINE__,serverInterface->getSwitchSetupRequests()[factionIdx]->getNetworkPlayerName().c_str());
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] networkPlayerName [%s]\n",__FILE__,__FUNCTION__,__LINE__,serverInterface->getSwitchSetupRequests()[factionIdx]->getNetworkPlayerName().c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] factionIdx = %d, switchSetupRequest.getNetworkPlayerName() [%s] switchSetupRequest.getNetworkPlayerStatus() = %d, switchSetupRequest.getSwitchFlags() = %d\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,switchSetupRequest.getNetworkPlayerName().c_str(),switchSetupRequest.getNetworkPlayerStatus(),switchSetupRequest.getSwitchFlags());