Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.