Fixing User Interaction Distance Gard Sync#525
Open
Lucasgood5 wants to merge 3 commits intoNebulousCloud:masterfrom
Open
Fixing User Interaction Distance Gard Sync#525Lucasgood5 wants to merge 3 commits intoNebulousCloud:masterfrom
Lucasgood5 wants to merge 3 commits intoNebulousCloud:masterfrom
Conversation
This commit fix desync from the check between Serverside CanPlayerInteractEntity and ClienSide ShowEntityMenu. The issue was that client side, we were checking distance by using a trace of 96u. Trace take origin from eye and stop at collision box. Serverside, the anti cheat check was comparing distance of entity. But this was starting by foot up to entity center. Meaning that if the entity was above, or with large entity, the client would think it is in range but the server said no. This commit make both check use the same methods (trace). Fixing the issue at the origin of NebulousCloud#483 without adding any configuration requirement. This commit doesn't edit but is also related to https://github.com/NebulousCloud/helix/blob/e35c691d630eda7693aef17d92015586294f95e6/gamemode/core/hooks/cl_hooks.lua#L737-L748
There was a problem hiding this comment.
Pull request overview
This PR fixes a desync between client-side entity menu range checks and the server-side CanPlayerInteractEntity validation by switching the server to use the same trace-based approach as the client.
Changes:
- Replaced server-side distance-to-entity-center validation with an aim trace (96u) starting from
GetShootPos(). - Server now allows interaction only when the selected entity matches the currently traced entity, aligning with client menu opening logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
just a little cleanner i guess Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit fix desync from the check between Serverside CanPlayerInteractEntity and ClienSide ShowEntityMenu.
The issue was that client side, we were checking distance by using a trace of 96u. Trace take origin from eye and stop at collision box. Serverside, the anti cheat check was comparing distance of entity. But this was starting by foot up to entity center. Meaning that if the entity was above, or with large entity, the client would think it is in range but the server said no.
This commit make both check use the same methods (trace). Fixing the issue at the origin of #483 without adding any configuration requirement.
This commit doesn't edit but is also related to
helix/gamemode/core/hooks/cl_hooks.lua
Lines 737 to 748 in e35c691