File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
com.unity.netcode.gameobjects/Runtime Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -1195,16 +1195,13 @@ internal void OnClientDisconnectFromServer(ulong clientId)
11951195 }
11961196 else if ( ! NetworkManager . ShutdownInProgress )
11971197 {
1198- // DANGO-TODO: We will want to match how the CMB service handles this. For now, we just try to evenly distribute
1199- // ownership.
1200- // NOTE: All of the below code only handles ownership transfer.
1198+ // NOTE: All of the below code only handles ownership transfer
12011199 // For client-server, we just remove the ownership.
1202- // For distributed authority, we need to change ownership based on parenting
1200+ // For distributed authority (DAHost only), we only transfer objects that are not parented or belong to the session owner.
1201+ // Rust server handles the object redistribution on its end.
12031202 if ( NetworkManager . DistributedAuthorityMode )
12041203 {
1205- // Only NetworkObjects that have the OwnershipStatus.Distributable flag set and are not OwnershipSessionOwner are distributed.
1206- // If the object has a parent - skip it for now, it will be distributed when its root parent is distributed.
1207- if ( ! ownedObject . IsOwnershipDistributable || ownedObject . IsOwnershipSessionOwner || ownedObject . GetCachedParent ( ) )
1204+ if ( ownedObject . IsOwnershipSessionOwner || ownedObject . GetCachedParent ( ) )
12081205 {
12091206 continue ;
12101207 }
Original file line number Diff line number Diff line change @@ -325,15 +325,6 @@ private void CheckForInScenePlaced()
325325
326326 // Default scene migration synchronization to false for in-scene placed NetworkObjects
327327 SceneMigrationSynchronization = false ;
328-
329- // Root In-scene placed NetworkObjects have to either have the SessionOwner or Distributable permission flag set.
330- if ( transform . parent == null )
331- {
332- if ( ! Ownership . HasFlag ( OwnershipStatus . SessionOwner ) && ! Ownership . HasFlag ( OwnershipStatus . Distributable ) )
333- {
334- Ownership |= OwnershipStatus . Distributable ;
335- }
336- }
337328 }
338329 }
339330#endif // UNITY_EDITOR
You can’t perform that action at this time.
0 commit comments