- allow the game to be published if it allow in game joining

This commit is contained in:
Mark Vejvoda 2013-03-01 17:21:58 +00:00
parent 5dd73bdec8
commit 2d2ec9afac
2 changed files with 8 additions and 1 deletions

View File

@ -2568,7 +2568,8 @@ void MenuStateCustomGame::update() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) chrono.start();
if(this->headlessServerMode == true || hasOneNetworkSlotOpen == true) {
if(this->headlessServerMode == true || hasOneNetworkSlotOpen == true ||
checkBoxAllowInGameJoinPlayer.getValue() == true) {
if(this->headlessServerMode == true &&
GlobalStaticFlags::isFlagSet(gsft_lan_mode) == false) {
checkBoxPublishServer.setValue(true);

View File

@ -2657,6 +2657,8 @@ void ServerInterface::simpleTask(BaseThread *callingThread) {
if(difftime((long int)time(NULL),lastMasterserverHeartbeatTime) >= MASTERSERVER_HEARTBEAT_GAME_STATUS_SECONDS) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Checking to see masterserver needs an update of the game status [%d] callingThread [%p] publishToMasterserverThread [%p]\n",needToRepublishToMasterserver,callingThread,publishToMasterserverThread);
lastMasterserverHeartbeatTime = time(NULL);
if(needToRepublishToMasterserver == true) {
try {
@ -2678,9 +2680,13 @@ void ServerInterface::simpleTask(BaseThread *callingThread) {
//printf("the request is:\n%s\n",request.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line %d] the request is:\n%s\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,request.c_str());
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Calling masterserver [%s]...\n",request.c_str());
std::string serverInfo = SystemFlags::getHTTP(request,handle);
SystemFlags::cleanupHTTP(&handle);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Done Calling masterserver\n");
//printf("the result is:\n'%s'\n",serverInfo.c_str());
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line %d] the result is:\n'%s'\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,serverInfo.c_str());
}