File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
code/components/citizen-server-impl/src/state Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2818,6 +2818,12 @@ bool ServerGameState::MoveEntityToCandidate(const fx::sync::SyncEntityPtr& entit
28182818 float distance = std::numeric_limits<float >::max ();
28192819
28202820 auto data = GetClientDataUnlocked (this , tgtClient);
2821+
2822+ if (data->routingBucket != entity->routingBucket )
2823+ {
2824+ continue ;
2825+ }
2826+
28212827 sync::SyncEntityPtr playerEntity;
28222828 {
28232829 std::shared_lock _lock (data->playerEntityMutex );
@@ -2831,6 +2837,12 @@ bool ServerGameState::MoveEntityToCandidate(const fx::sync::SyncEntityPtr& entit
28312837 if (pos.x != 0 .0f && !tgts.empty ())
28322838 {
28332839 distance = glm::distance2 (tgts[0 ], pos);
2840+
2841+ auto cullingRadius = data->GetPlayerCullingRadius ();
2842+ if (distance > (cullingRadius * cullingRadius))
2843+ {
2844+ continue ;
2845+ }
28342846 }
28352847 }
28362848
You can’t perform that action at this time.
0 commit comments