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::GetMaxHealthForBuffing and CTFPlayer::Event_KilledOther patches 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_CalculateMaxSpeed patches is updated to automatically scan any of the playerclass == TF_CLASS_* instructions found in function, and updates TF_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::IsPlayerClass patch 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.
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::GetMaxHealthForBuffing
andCTFPlayer::Event_KilledOther
patches 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_CalculateMaxSpeed
patches 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::IsPlayerClass
patch 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.