File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
MLAPI/MonoBehaviours/Core Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ public abstract class NetworkedBehaviour : MonoBehaviour
2020 /// </summary>
2121 public bool isLocalPlayer => networkedObject . isLocalPlayer ;
2222 /// <summary>
23- /// Gets if the object is owned by the local player
23+ /// Gets if the object is owned by the local player or if the object is the local player object
2424 /// </summary>
2525 public bool isOwner => networkedObject . isOwner ;
2626 /// <summary>
27+ /// Gets if the object is owned by the local player and this is not a player object
28+ /// </summary>
29+ public bool isObjectOwner => networkedObject . isObjectOwner ;
30+ /// <summary>
2731 /// Gets if we are executing as server
2832 /// </summary>
2933 protected bool isServer => NetworkingManager . singleton . isServer ;
Original file line number Diff line number Diff line change @@ -68,9 +68,13 @@ internal set
6868 /// </summary>
6969 public bool isLocalPlayer => isPlayerObject && ( OwnerClientId == NetworkingManager . singleton . LocalClientId || ( OwnerClientId == NetworkingManager . singleton . NetworkConfig . NetworkTransport . HostDummyId && NetworkingManager . singleton . isHost ) ) ;
7070 /// <summary>
71- /// Gets if the object is owned by the local player
71+ /// Gets if the object is owned by the local player or if the object is the local player object
7272 /// </summary>
73- public bool isOwner => ! isPlayerObject && ( OwnerClientId == NetworkingManager . singleton . LocalClientId || ( OwnerClientId == NetworkingManager . singleton . NetworkConfig . NetworkTransport . HostDummyId && NetworkingManager . singleton . isHost ) ) ;
73+ public bool isOwner => isLocalPlayer || isObjectOwner ;
74+ /// <summary>
75+ /// Gets if the object is owned by the local player and this is not a player object
76+ /// </summary>
77+ public bool isObjectOwner => ! isPlayerObject && ( OwnerClientId == NetworkingManager . singleton . LocalClientId || ( OwnerClientId == NetworkingManager . singleton . NetworkConfig . NetworkTransport . HostDummyId && NetworkingManager . singleton . isHost ) ) ;
7478 /// <summary>
7579 /// Gets wheter or not the object is owned by anyone
7680 /// </summary>
You can’t perform that action at this time.
0 commit comments