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

Fixes for OnPlayerTeleport hook for linux and linux64 systems #2234

Merged
merged 5 commits into from
Dec 26, 2024

Conversation

MrD4rk5oul
Copy link
Contributor

Merge #2214 failed due to pointer misalignment which was fixed in safetyhook and a revision commit was made, making the process of hooking work normally again.

Tests were made on Linux with bare MM+SM installations, MM+SM+many dummy plugins using different hooks and both mock and production servers , and no recurring crashes were reported.

Tests were also made on Windows, both with MM+SM installations and MM+SM+dummy hook plugins.

Pull request fixes issue #2140.

  - Changed signature call of `CanPlayerTeleport` for linux/linux64 to current used name
  - Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux
Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up on this! Can we change the gamedata update to instead use a new name for this, leaving the original one as-is? Otherwise, if we push the updated gamedata to the gamedata updater without users necessarily having manually updated SourceMod, there will be a mismatch between what function variant the code is targeting versus what the gamedata is targeting.

@psychonic
Copy link
Member

Thanks for following up on this! Can we change the gamedata update to instead use a new name for this, leaving the original one as-is? Otherwise, if we push the updated gamedata to the gamedata updater without users necessarily having manually updated SourceMod, there will be a mismatch between what function variant the code is targeting versus what the gamedata is targeting.

Should also add a comment to note why it was done, noting that the older one can be nuked later.

@MrD4rk5oul
Copy link
Contributor Author

MrD4rk5oul commented Dec 26, 2024

Added a new registry for the teleportation checking and marked the old one as Obsolete.

New registry is called CanPlayerBeTeleported

Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's perfect. Thanks!

@psychonic psychonic merged commit 52211de into alliedmodders:master Dec 26, 2024
3 of 4 checks passed
psychonic pushed a commit that referenced this pull request Dec 31, 2024
* - Fixes for OnPlayerTeleport hook for linux and linux64 systems
  - Changed signature call of `CanPlayerTeleport` for linux/linux64 to current used name
  - Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux

* Created a new registry for Teleportation Checking, marking the old one obsolete for older Sourcemod versions.

(cherry picked from commit 52211de)
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.

2 participants