NetServerInfo not saved after the exit cleanup

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

NetServerInfo not saved after the exit cleanup

Postby drfrag » Mon Oct 05, 2020 10:32 am

It's about this code in FGameConfigFile::ArchiveGameData:
Code: Select allExpand view
   // Do not overwrite the serverinfo section if playing a netgame, and
   // this machine was not the initial host.
   if (!netgame || consoleplayer == 0)
   {
      strncpy (subsection, netgame ? "NetServerInfo" : "LocalServerInfo", sublen);
      SetSection (section, true);
      ClearCurrentSection ();
      C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_SERVERINFO);

      if (bModSetup)
      {
         strncpy (subsection, netgame ? "NetServerInfo.Mod" : "LocalServerInfo.Mod", sublen);
         SetSection (section, true);
         ClearCurrentSection ();
         C_ArchiveCVars (this, CVAR_MOD|CVAR_ARCHIVE|CVAR_AUTO|CVAR_SERVERINFO);
      }
   }

I've made a PR: https://github.com/coelckers/gzdoom/pull/1203
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: NetServerInfo not saved after the exit cleanup

Postby drfrag » Tue Oct 06, 2020 2:25 am

I've done another PR but apparently it isn't good either and i can't think of a better way to fix it: https://github.com/coelckers/gzdoom/pull/1204
It's not a big deal unless you have an old ini with that section becouse the settings there override those in LocalServerInfo. With a fresh ini you could play with the SP settings.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: NetServerInfo not saved after the exit cleanup

Postby Graf Zahl » Tue Oct 06, 2020 4:45 am

You fix the condition right in the place where things go wrong top cover your case, but don't massage some global variables to make the condition become true.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: NetServerInfo not saved after the exit cleanup

Postby drfrag » Tue Oct 06, 2020 5:05 am

Actually that was what i attempted first but after messing with it i could not find a solution without using netgame.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest