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!
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3113
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

NetServerInfo not saved after the exit cleanup

Post by drfrag »

It's about this code in FGameConfigFile::ArchiveGameData:

Code: Select all

	// 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
Vintage GZDoom Developer
Posts: 3113
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: NetServerInfo not saved after the exit cleanup

Post by drfrag »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48543
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: NetServerInfo not saved after the exit cleanup

Post by Graf Zahl »

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
drfrag
Vintage GZDoom Developer
Posts: 3113
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: NetServerInfo not saved after the exit cleanup

Post by drfrag »

Actually that was what i attempted first but after messing with it i could not find a solution without using netgame.

Return to “Bugs [GZDoom]”