fix(citizen-server-impl): validate onesync range when reassigning entity ownership - #3725
fix(citizen-server-impl): validate onesync range when reassigning entity ownership#3725DaniGP17 wants to merge 1 commit into
Conversation
FabianTerhorst
left a comment
There was a problem hiding this comment.
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.
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. |
|
Would be a big thing if this could get added if working, been a long standing issue 🙏 |
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/