File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
com.unity.netcode.gameobjects/Runtime/Connection Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1177,8 +1177,7 @@ internal void OnClientDisconnectFromServer(ulong clientId)
11771177 if ( ownedObject )
11781178 {
11791179 // If destroying with owner, then always despawn and destroy (or defer destroying to prefab handler)
1180- // Handle an object with no observers other than the current disconnecting client as destroying with owner
1181- if ( ! ownedObject . DontDestroyWithOwner && ( ownedObject . Observers . Count == 0 || ( ownedObject . Observers . Count >= 1 && ownedObject . Observers . Contains ( clientId ) ) ) )
1180+ if ( ! ownedObject . DontDestroyWithOwner )
11821181 {
11831182 if ( NetworkManager . PrefabHandler . ContainsHandler ( ownedObject . GlobalObjectIdHash ) )
11841183 {
@@ -1244,7 +1243,7 @@ internal void OnClientDisconnectFromServer(ulong clientId)
12441243 }
12451244
12461245 // Skip destroy with owner objects as they will be processed by the outer loop
1247- if ( ! childObject . DontDestroyWithOwner && ( childObject . Observers . Count == 0 || ( childObject . Observers . Count == 1 && childObject . Observers . Contains ( clientId ) ) ) )
1246+ if ( ! childObject . DontDestroyWithOwner )
12481247 {
12491248 continue ;
12501249 }
You can’t perform that action at this time.
0 commit comments