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

Set convars in autoexec if the value starts with a dash #9

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

cpdt
Copy link
Collaborator

@cpdt cpdt commented Jan 25, 2022

Issue: Setting an extra argument to a value starting with a dash does not work, e.g.:

-e NS_EXTRA_ARGUMENTS="+slide_step_velocity_reduction -1000"

This ends up running the dedicated server like:

NorthstarLauncher.exe "+slide_step_velocity_reduction" "-1000"

The dedicated server is probably interpreting the -1000 as a command-line flag, so it's ignored when parsing the actual args.

Solution: This PR forces convars to be set in the generated autoexec file if the value starts with a dash, ensuring the value is parsed as a number and not a flag.

One possible alternative is wrapping values in an extra pair of quotes, i.e.:

NorthstarLauncher.exe "+slide_step_velocity_reduction" "\"-1000\""

However the launcher doesn't seem to be capable of parsing values likes this.

updates #10

Copy link
Owner

@pg9182 pg9182 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pg9182
Copy link
Owner

pg9182 commented Jan 26, 2022

Thanks!

The config merging is getting messier since I didn't foresee these complications, so I'll probably rewrite it soon.

@pg9182 pg9182 merged commit 6fba6bf into pg9182:master Jan 26, 2022
@cpdt cpdt deleted the handle-dashed-values branch January 27, 2022 04:21
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.

2 participants