Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo patches to be more robust #117

Merged
merged 2 commits into from
May 13, 2024
Merged

Redo patches to be more robust #117

merged 2 commits into from
May 13, 2024

Conversation

FortyTwoFortyTwo
Copy link
Owner

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.

@FortyTwoFortyTwo FortyTwoFortyTwo merged commit a3ae9ac into master May 13, 2024
2 checks passed
@FortyTwoFortyTwo FortyTwoFortyTwo deleted the patch branch May 13, 2024 17:30
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.

1 participant