Change the marker cvars delimiter char#1968
Open
Rainyan wants to merge 3 commits into
Open
Conversation
Change the "cl_neo_...marker" cvars' delimiter character from ';' to ',', because the engine tokenizer uses the semicolon as a command-level delimiter, and there is no escape character available. This causes issues for nested semicolons in config file binds etc, where the inner semicolon of the marker syntax is incorrectly intepreted as the end-of-command token. I'm taking the easy route of simply changing our marker delimiter character to something better supported, because we don't have source code access to the lexer internals, so else we'd have to detour or shim the engine interface which gets ugly. This has the one-time side effect of mauling people's marker configs for the next patch, but that shouldn't be too much of an issue since the config is trivially fixable for anyone with custom settings. We might also want to revisit the crosshair code delimiters and any other such serialized data in the future, and perhaps transfer them over to a more suitable delimiter character as well.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Change the
cl_neo_...markercvars' delimiter character from';'to',', because the engine tokenizer uses the semicolon as a command-level delimiter, and there is no escape character available. This causes issues for nested semicolons in config file binds etc, where the inner semicolon of the marker syntax is incorrectly interpreted as the end-of-command token.I'm taking the easy route of simply changing our marker delimiter character to something better supported, because we don't have source code access to the lexer internals, so else we'd have to detour or shim the engine interface which gets ugly.
This has the one-time side effect of mauling people's marker configs for the next patch (causing those marker values to reset to defaults), but that shouldn't be too much of an issue since the config is trivially fixable for anyone with custom settings.
I'm limiting the scope of this PR to simply fixing the marker cvars, but we should probably also revisit the crosshair code syntax (and any other such serializations:
CH_XH_SEGEND), and also change their delimiter characters to','or some other agreed upon character that has no conflicts.Steps to test
Previously, with the
;delimiter, this kind of a bind would fail. Likewise attempting to nest"quotes as a workaround to escape the semicolons would not work (but nested/escaped tokens or any kind of changes to the lexer in general are out of scope for this PR).Toolchain
Linked Issues