-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(citizen-server-impl): validate onesync range when reassigning entity ownership #3725
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
base: master
Are you sure you want to change the base?
fix(citizen-server-impl): validate onesync range when reassigning entity ownership #3725
Conversation
FabianTerhorst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution.
|
this would explain some of the issues people are experiencing when changing routing buckets, great work! |
|
This is great work |
|
I'm a bit confused on how this actually fixes ownership (at least in the case of routing buckets), the logic is already handled via See: fivem/code/components/citizen-server-impl/src/state/ServerGameState.cpp Lines 1200 to 1206 in 96dec18
|
FabianTerhorst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further investigation this might not be the best fix for this issue. Also entities that would be stuck in this would be fixed automatically after 10 seconds.
0652aa7 to
5b20ac4
Compare
…hanges and reduce migration timeout
78b9020 to
b2e4e51
Compare
|
I've made changes in case anyone wants to review it. |
Goal of this PR
Fixes a bug where vehicle entities become stuck/frozen after players change routing buckets or disconnect. The issue occurred when entity ownership was incorrectly transferred to players outside of OneSync range, causing entities to be uninteractable until the assigned owner (who is too far away) teleports back to the entity.
How is this PR achieving the goal
Validate that the candidate player is in the same routing bucket and is in the culling radius of the entity.
This PR applies to the following area(s)
Server
Successfully tested on
I couldn't test this because the user that report this on the forum said that to reproduce the issue I need 20-30 players.
Checklist
Fixes issues
https://forum.cfx.re/t/server-side-vehicles-being-frozen-at-random/