mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkIdentity: OnStartLocalPlayer moved next to OnStartClient
This commit is contained in:
parent
1c356bff44
commit
fc7d2e8df6
@ -570,6 +570,19 @@ internal void OnStartClient()
|
||||
}
|
||||
}
|
||||
|
||||
private static NetworkIdentity previousLocalPlayer = null;
|
||||
internal void OnStartLocalPlayer()
|
||||
{
|
||||
if (previousLocalPlayer == this)
|
||||
return;
|
||||
previousLocalPlayer = this;
|
||||
|
||||
foreach (NetworkBehaviour comp in NetworkBehaviours)
|
||||
{
|
||||
comp.OnStartLocalPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
bool hadAuthority;
|
||||
internal void NotifyAuthority()
|
||||
{
|
||||
@ -885,19 +898,6 @@ internal void HandleRPC(int componentIndex, int rpcHash, NetworkReader reader)
|
||||
HandleRemoteCall(componentIndex, rpcHash, MirrorInvokeType.ClientRpc, reader);
|
||||
}
|
||||
|
||||
private static NetworkIdentity previousLocalPlayer = null;
|
||||
internal void OnStartLocalPlayer()
|
||||
{
|
||||
if (previousLocalPlayer == this)
|
||||
return;
|
||||
previousLocalPlayer = this;
|
||||
|
||||
foreach (NetworkBehaviour comp in NetworkBehaviours)
|
||||
{
|
||||
comp.OnStartLocalPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
internal void OnNetworkDestroy()
|
||||
{
|
||||
foreach (NetworkBehaviour comp in NetworkBehaviours)
|
||||
|
Loading…
Reference in New Issue
Block a user