Skip to content

Commit 1fe6a74

Browse files
committed
Added isOwner to NetworkedBehaviour
1 parent 387a988 commit 1fe6a74

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ protected bool isHost
3535
return NetworkingManager.singleton.isHost;
3636
}
3737
}
38+
protected bool isOwner
39+
{
40+
get
41+
{
42+
return networkedObject.isOwner;
43+
}
44+
}
3845
public NetworkedObject networkedObject
3946
{
4047
get

MLAPI/MonoBehaviours/Core/NetworkedObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public bool isLocalPlayer
2626
}
2727
}
2828

29-
public bool IsOwner
29+
public bool isOwner
3030
{
3131
get
3232
{

MLAPI/MonoBehaviours/Prototyping/NetworkedAnimator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool sendMessagesAllowed
5757
{
5858
get
5959
{
60-
return networkedObject.IsOwner || isLocalPlayer;
60+
return isOwner || isLocalPlayer;
6161
}
6262
}
6363

@@ -315,7 +315,7 @@ public void SetTrigger(string triggerName)
315315

316316
public void SetTrigger(int hash)
317317
{
318-
if (isLocalPlayer || networkedObject.IsOwner)
318+
if (isLocalPlayer || isOwner)
319319
{
320320
using (MemoryStream stream = new MemoryStream())
321321
{

0 commit comments

Comments
 (0)