Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cvar: make r_dpMaterial, fs_legacypaks and fs_maxSymlinkDepth latched cvars #264

Open
wants to merge 2 commits into
base: master
from

Conversation

@illwieckz
Copy link
Member

illwieckz commented Jan 8, 2020

  • reimplement latched cvar in new cvar system
  • make r_dpMaterial a latched cvar
  • make fs_legacypaks and fs_maxSymlinkDepth latched cvars

All I want is to be told to restart when I change those cvars.

Note that:

  1. it seems to work
  2. @Kangz wrote in ad04f91 that CVAR_LATCH is ”not longer supported” and “will be implemented by the proxy” which is not I done (and I don't know what Kangz expected):
    //CVAR_LATCH, CVAR_SHADER, CVAR_INIT are not longer supported, will be implemented by the proxy

So, they may be dragons!

@slipher

This comment has been minimized.

Copy link
Member

slipher commented Jan 9, 2020

I tried the latched cvar and don't think it is working. Compare the behavior to an old-style latched cvar:

]/r_dpMaterial 
"r_dpMaterial" - bool - Enable DarkPlaces material compatibility^* - default: "off^*"
]/r_dpMaterial on
The change will take effect after restart.
]/r_dpMaterial
"r_dpMaterial" - "on" - bool - Enable DarkPlaces material compatibility^* - default: "off^*"
]/r_customheight
"r_customheight" - "700^*"^* - default: "1024^*"
]/r_customheight 702
The change will take effect after restart.
]/r_customheight 
"r_customheight" - "700^*" - latched value "702^*"^* - default: "1024^*"

I can look into implementing it for new-style cvars this weekend.

@illwieckz

This comment has been minimized.

Copy link
Member Author

illwieckz commented Jan 9, 2020

I see, I admit all I was looking for was a message telling me to restart. It's true that LATCH does more than that.

@slipher

This comment has been minimized.

Copy link
Member

slipher commented Jan 14, 2020

See #272 for latched cvars

@illwieckz illwieckz force-pushed the illwieckz:cvarlatch branch from 026ea0b to f5b50a7 Jan 15, 2020
@illwieckz illwieckz changed the title cvar: reimplement latched cvar in new cvar system, make r_dpMaterial a latched cvar cvar: make r_dpMaterial, fs_legacypaks and fs_maxSymlinkDepth latched cvars Jan 15, 2020
@illwieckz illwieckz force-pushed the illwieckz:cvarlatch branch from f5b50a7 to e9522b8 Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.