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
20
20
/// </summary>
21
21
public bool isLocalPlayer => networkedObject . isLocalPlayer ;
22
22
/// <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
24
24
/// </summary>
25
25
public bool isOwner => networkedObject . isOwner ;
26
26
/// <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>
27
31
/// Gets if we are executing as server
28
32
/// </summary>
29
33
protected bool isServer => NetworkingManager . singleton . isServer ;
Original file line number Diff line number Diff line change @@ -68,9 +68,13 @@ internal set
68
68
/// </summary>
69
69
public bool isLocalPlayer => isPlayerObject && ( OwnerClientId == NetworkingManager . singleton . LocalClientId || ( OwnerClientId == NetworkingManager . singleton . NetworkConfig . NetworkTransport . HostDummyId && NetworkingManager . singleton . isHost ) ) ;
70
70
/// <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
72
72
/// </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 ) ) ;
74
78
/// <summary>
75
79
/// Gets wheter or not the object is owned by anyone
76
80
/// </summary>
You can’t perform that action at this time.
0 commit comments