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

Projects
None yet
3 participants
@heinrich5991
Contributor

heinrich5991 commented Sep 10, 2015

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;

This comment has been minimized.

@heinrich5991

heinrich5991 Oct 2, 2015

Contributor

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

This comment has been minimized.

@east

east Oct 3, 2015

Contributor

Why not keeping the previously set config variables here?

This comment has been minimized.

@heinrich5991

heinrich5991 Oct 3, 2015

Contributor

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.

heinrich5991 added some commits Oct 6, 2015

Only update cl_antiping_* if cl_antiping is 0
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.
Set cl_antiping_* to 1 by default
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

This comment has been minimized.

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

Merge pull request #333 from heinrich5991/pr_ddnet_antiping_no_reset
Don't reset `cl_antiping` subconfig on restart

@H-M-H H-M-H merged commit bf8aea3 into ddnet:master Oct 21, 2015

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment