Skip to content

Remove trailing f from convar default values#1771

Merged
AdamTadeusz merged 3 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:324_removeTrailingFFromConVarDefaultValues
May 23, 2026
Merged

Remove trailing f from convar default values#1771
AdamTadeusz merged 3 commits into
NeotokyoRebuild:masterfrom
AdamTadeusz:324_removeTrailingFFromConVarDefaultValues

Conversation

@AdamTadeusz
Copy link
Copy Markdown
Contributor

@AdamTadeusz AdamTadeusz commented Mar 2, 2026

Description

Removed trailing f from all convar definitions we have access to, offending convars were found with

	if (Q_stristr(pDefaultValue, "f") && !Q_stristr(pName, "__cl_neo_git_hash") && (Q_stristr(pDefaultValue, "0") || Q_stristr(pDefaultValue, "1") || Q_stristr(pDefaultValue, "2") || Q_stristr(pDefaultValue, "3") || Q_stristr(pDefaultValue, "4") || Q_stristr(pDefaultValue, "5") || Q_stristr(pDefaultValue, "6") || Q_stristr(pDefaultValue, "7") || Q_stristr(pDefaultValue, "8") || Q_stristr(pDefaultValue, "9")))
	{
		Assert(false);
	}

inside

void ConVar::Create(

Toolchain

  • Windows MSVC VS2022

Linked Issues

@AdamTadeusz AdamTadeusz requested a review from a team March 2, 2026 12:42
@Rainyan Rainyan self-requested a review March 2, 2026 18:57
@AdamTadeusz
Copy link
Copy Markdown
Contributor Author

I'm happy to limit this to only convars we defined ourselves if we think editing basegame convar definitions like this is unnecessary

@Agiel
Copy link
Copy Markdown
Contributor

Agiel commented Mar 10, 2026

I'm happy to limit this to only convars we defined ourselves if we think editing basegame convar definitions like this is unnecessary

I'd prefer this, unless it's something that affects our build system.

@AdamTadeusz AdamTadeusz merged commit 7c48fd3 into NeotokyoRebuild:master May 23, 2026
7 checks passed
@AdamTadeusz AdamTadeusz deleted the 324_removeTrailingFFromConVarDefaultValues branch May 23, 2026 16:13
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.

ConVars with default float values should not have an unnecessary trailing f

4 participants