[Added] add "nosave" cvar token

Moderator: GZDoom Developers

add "nosave" cvar token

Postby m8f » Sun Jan 05, 2020 10:33 am

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
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit

Re: add "nosave" cvar token

Postby m8f » Mon Jan 06, 2020 12:25 am

... 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
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit

Re: add "nosave" cvar token

Postby Graf Zahl » Mon Jan 06, 2020 1:15 am

Too late for reverting it. We can either remove setting the flag or just keep it as a pointless feature.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: add "nosave" cvar token

Postby m8f » Mon Jan 06, 2020 4:54 am

Closer examination showed that this feature is actually needed.

Here is the working implementation.

PR: https://github.com/coelckers/gzdoom/pull/1011
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest