Randomizer
Randomizer copied to clipboard
Redo patches to be more robust
Patches tends to easily break from TF2 update for both windows and linux, and can be painful to maintain it. This PR updates it to try make it last worthwhile.
-
CTFPlayer::GetMaxHealthForBuffingandCTFPlayer::Event_KilledOtherpatches are removed, replacing with hooks to manually update it. Would be insane if future TF2 were to actually edit these functions with whatever balance changes. -
CTFPlayer::TeamFortress_CalculateMaxSpeedpatches is updated to automatically scan any of theplayerclass == TF_CLASS_*instructions found in function, and updatesTF_CLASS_*value to whichever class is currently at. There are safety checks that it would not attempt to patch if unexpected amount is found. -
CTFPlayer::IsPlayerClasspatch is unchanged, it's a small function that should be simple enough to maintain it.
Also while at it, refactor dhooks and sdktools for things blah blah blah.