gemidyne / microtf2

A custom gamemode for Team Fortress 2 - Players compete against each other to get the most points by playing a series of rapid fire microgames in order to win the round!
https://www.gemidyne.com/projects/microtf2
GNU General Public License v2.0
30 stars 16 forks source link

Remove usage of TF2_CalcIsAttackCritical entirely #218

Closed FlaminSarge closed 2 years ago

FlaminSarge commented 2 years ago

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 commented 2 years ago

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.

safalin1 commented 2 years ago

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 de5c8cfc5c00fe32a5835b23062dfe37956a4396

FlaminSarge commented 2 years ago

There's a fix for mainline SourceMod ( https://github.com/alliedmodders/sourcemod/pull/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.