Skip to content

Remove usage of TF2_CalcIsAttackCritical entirely#218

Merged
safalin1 merged 1 commit intogemidyne:masterfrom
FlaminSarge:master
Sep 2, 2021
Merged

Remove usage of TF2_CalcIsAttackCritical entirely#218
safalin1 merged 1 commit intogemidyne:masterfrom
FlaminSarge:master

Conversation

@FlaminSarge
Copy link
Copy Markdown
Contributor

When any plugin uses this forward, serverside crit calculation desyncs from clientside crit calculation, even if the forward solely returns Plugin_Continue.
Any time MicroTF2 is loaded, 'fake crits' start occurring on certain server setups, even if IsPluginEnabled is false.
None of the minigames seem to use this forward aside from 26, which can easily be replaced by HalloweenCritCandy.
If crits need to be disabled, either the attribute for 'no random crits' or the cvar for disabling crits can be used.

@FlaminSarge
Copy link
Copy Markdown
Contributor Author

FlaminSarge commented Sep 2, 2021

Unsure what version to bump to for this so I'll leave it to you.

Also, looks like this should be ported to dev too, as that doesn't have any additional usages of this forward.

When any plugin uses this forward, serverside crit calculation desyncs from clientside crit calculation, even if the forward solely returns Plugin_Continue.
Any time MicroTF2 is loaded, 'fake crits' start occurring on certain server setups, even if IsPluginEnabled is false.
None of the minigames seem to use this forward aside from 26, which can easily be replaced by HalloweenCritCandy.
If crits need to be disabled, either the attribute for 'no random crits' or the cvar for disabling crits can be used.
safalin1 added a commit that referenced this pull request Sep 2, 2021
@safalin1
Copy link
Copy Markdown
Collaborator

safalin1 commented Sep 2, 2021

Thanks for the PR - I never knew this was an issue. I'll look to doing another maintenance release tomorrow / this weekend.

Ported to dev branch in de5c8cf

@safalin1 safalin1 merged commit 96ee70b into gemidyne:master Sep 2, 2021
@FlaminSarge
Copy link
Copy Markdown
Contributor Author

There's a fix for mainline SourceMod ( alliedmodders/sourcemod#1573 ) for this in the works as well, but the plugin is using CalcCritical for something it really doesn't seem to need to, so I figured we can remove it and then add it back later if it's definitely needed for something.

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