Skip to content

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
SollyBunny pushed a commit to SollyBunny/ddnet that referenced this pull request Apr 9, 2025
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.

3 participants