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

fix(map): Unconditionally create gm, ttt and ttt2 prefixes #1669

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Histalek
Copy link
Member

This is a draft until i've verified that this doesn't do funky stuff on specific configurations

We can reasonably assume gm maps to be present on the server the same goes for ttt and ttt2 maps.
Even if either or both of them are not currently installed on the server creating these unconditionally would allow an admin to configure their behaviour in that case.

Creating these convars unconditionally instead of dynamically has the added upside that if an admin would change the value to non-default the value value will be set on file read and won't trigger FCVAR_NOTIFY. (An "active" convar change mid-round will still trigger FCVAR_NOTIFY as normal)

Creating convars dynamically if we find other map prefixes is still done and is still affected by the above caveat.

Closes #1632

With this change we could also disable gm maps by default and additionally disable all other map prefixes by default. That's up for discussion

We can reasonably assume `gm` maps to be present on the server the same
goes for `ttt` and `ttt2` maps.
Even if either or both of them are not currently installed on the server
creating these unconditionally would allow an admin to configure their
behaviour in that case.

Creating these convars unconditionally instead of dynamically has the
added upside that if an admin would change the value to non-default the
value value will be set on file read and won't trigger `FCVAR_NOTIFY`.
(An "active" convar change mid-round will still trigger `FCVAR_NOTIFY`
as normal)

Creating convars dynamically if we find other map prefixes is still done
and is still affected by the above caveat.
@Histalek Histalek requested a review from TimGoll October 20, 2024 10:31
@Histalek Histalek self-assigned this Oct 20, 2024
@TimGoll
Copy link
Member

TimGoll commented Oct 20, 2024

This only resolves the issue for the prefixes you added. If one adds a map with another prefix, the issue still persists

@Histalek
Copy link
Member Author

This only resolves the issue for the prefixes you added. If one adds a map with another prefix, the issue still persists

i'm aware of that, if we can find a fix for all prefixes that would be nice!
This would only fix the common occurrences of the issue

if we would flip all other prefixes to off by default this issue would only occur for servers that enable any other prefixes and i would guess that not many servers would want to play on non-ttt prefixed maps

@TimGoll
Copy link
Member

TimGoll commented Oct 20, 2024

This only resolves the issue for the prefixes you added. If one adds a map with another prefix, the issue still persists

i'm aware of that, if we can find a fix for all prefixes that would be nice! This would only fix the common occurrences of the issue

if we would flip all other prefixes to off by default this issue would only occur for servers that enable any other prefixes and i would guess that not many servers would want to play on non-ttt prefixed maps

If you are aware, then it is fine with me. I already tried for an hour or so, sadly without luck so far.

But mexikoedi and I discussed if we should maybe remove the convar change announcement to chat for all convars. That would resolve this issue as well. And announcing convar changes to chat doesn't see polished to me. We could probably make sure that it is still logged to the console or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server cvar message constantly showing up in chat
2 participants