Latches for CVARINFO

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Latches for CVARINFO

Re: Latches for CVARINFO

by Player701 » Sun Aug 28, 2022 11:42 am

Since we're talking about latch CVArs, I could really use the ability to get both the actual ("latched") and the new (queued) value of a latched CVAR via ZScript, unless this is already in and I've somehow missed it happening. (As far as I'm aware, the current ZScript APIs allow retrieving only the latched value.)

Re: Latches for CVARINFO

by Marisa the Magician » Sun Aug 28, 2022 10:58 am

This does make sense, considering there's so many things that require a map restart to take full effect. Having the cvar latch would at least let players know right away that it's required.

Latches for CVARINFO

by Major Cooke » Sat Aug 27, 2022 6:02 pm

Seeing it was removed from sv_cheats had me thinking... There's been many times I've been craving latches for different events happening, some of which could be when changing a map, or starting a new game. I have some gameplay options that, in order to prevent players from getting the immediate benefit and doing switcharoos and then switching back, I had to code in myself but if it's hard coded into the engine, I wouldn't need to worry about those anymore.

So I propose a couple latches:
  • Map Latch - The config option kicks in the change upon loading a new map
  • New Game Latch - Takes place upon starting fresh - pistol start, either from death exit or starting a new game - triggers it
Along with a sub-latch to specify whether to trigger on maps already visited in a hub or not.

Top