Latch cvars cannot be changed on a TITLEMAP
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 1288
- Joined: Fri Nov 07, 2008 3:29 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Location: Maryland, USA, but probably also in someone's mod somewhere
Latch cvars cannot be changed on a TITLEMAP
... because a TITLEMAP counts as a game in progress. This hinders end user experience when you're developing a mod with a TITLEMAP (or an addon to one) involving options that shouldn't be able to be changed in the middle of a game session, as when the user enters the options menu they find options that inexplicably can't be changed plus zero feedback on why they can't change them.
-
-
- Posts: 1684
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Latch cvars cannot be changed on a TITLEMAP
Clarification: latch CVARs can be changed, the actual problem is that there is no way to retrieve the pending value from user code - thus, you always see only the current value in the menu, and this is indeed confusing. This likely stems from the fact that latch CVARs were not designed to work with menus in the first place. I believe this issue has been brought up multiple times before, and the only workaround I know of is to use non-latch CVARs instead and implement the "latching" mechanism manually in ZScript, which is exactly what I did in my own project.
-
- Posts: 1288
- Joined: Fri Nov 07, 2008 3:29 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Location: Maryland, USA, but probably also in someone's mod somewhere
Re: Latch cvars cannot be changed on a TITLEMAP
That sounds like a lot of extra effort to work around an oversight in the menu code.
-
- Lead GZDoom+Raze Developer
- Posts: 49183
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Latch cvars cannot be changed on a TITLEMAP
The only native latch CVARs are deathmatch and gameskill, which - big surprise! - were never supposed to be used in a menu.
Unfortunately there is no trivial fix because the latched values are stored out of reach from the menu.
My general advice here is, do not use latch variables in the menu.
I'll file this as "can't fix".
Unfortunately there is no trivial fix because the latched values are stored out of reach from the menu.
My general advice here is, do not use latch variables in the menu.
I'll file this as "can't fix".