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

Don't reset cl_antiping subconfig on restart #333

Merged
merged 5 commits into from Oct 21, 2015

Conversation

heinrich5991
Copy link
Member

With backward-compatiblity (sets cl_antiping_* to 1 on first start.)

Fixes #327.

{
g_Config.m_ClAntiPingPlayers = 1;
g_Config.m_ClAntiPingGrenade = 1;
g_Config.m_ClAntiPingWeapons = 1;
Copy link
Member Author

Choose a reason for hiding this comment

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

Should probably only set this to 1 if m_ClAntiPing is 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not keeping the previously set config variables here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the old behavior reset all these to 0 when the player set m_ClAntiPing to 0. With the new system, they don't get set to 1 automatically when the m_ClAntiPing setting is set to 1, thus all antiping measures would be disabled by default if someone used an old config without this workaround.

If cl_antiping is 1, the previous version of the code would have set all
other antiping variables to 1 anyway, so with this commit the user can
retain their antiping config if they configured after the last start of
the old client.
This would also happen anyway as no config is treated as config
version 0, since cl_antiping is 0, all the subconfigs would be set to 0.
@H-M-H
Copy link
Member

H-M-H commented Oct 21, 2015

everything worked while testing and code looks fine too, gonna merge

H-M-H added a commit that referenced this pull request Oct 21, 2015
Don't reset `cl_antiping` subconfig on restart
@H-M-H H-M-H merged commit bf8aea3 into ddnet:master Oct 21, 2015
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.

None yet

3 participants