add "nosave" cvar token

Moderator: GZDoom Developers

Post Reply
User avatar
m8f
 
 
Posts: 1461
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)
Contact:

add "nosave" cvar token

Post by m8f »

It makes a cvar value not be saved in a save file.

Use case: saving global gameplay statistics. If it's saved into a savefile, loading this savefile will overwrite the updated statistics.

PR: https://github.com/coelckers/gzdoom/pull/1009
User avatar
m8f
 
 
Posts: 1461
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)
Contact:

Re: add "nosave" cvar token

Post by m8f »

... And reverting this.

1. It turns out that it wasn't even needed. Saving server cvars in the save file can be easily overwritten with the value from ini.
2. nosave cvars are not saved not only to savefile, but to INI too. So such cvars could not be used for the intended purpose in the first place.

Sorry.

PR: https://github.com/coelckers/gzdoom/pull/1010
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: add "nosave" cvar token

Post by Graf Zahl »

Too late for reverting it. We can either remove setting the flag or just keep it as a pointless feature.
User avatar
m8f
 
 
Posts: 1461
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)
Contact:

Re: add "nosave" cvar token

Post by m8f »

Closer examination showed that this feature is actually needed.

Here is the working implementation.

PR: https://github.com/coelckers/gzdoom/pull/1011
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”