mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkIdentity: remove redundant OnUpdateVars function
This commit is contained in:
parent
782848094b
commit
1c356bff44
@ -501,7 +501,7 @@ static void ApplySpawnPayload(NetworkIdentity identity, SpawnMessage msg)
|
|||||||
{
|
{
|
||||||
using (PooledNetworkReader payloadReader = NetworkReaderPool.GetReader(msg.payload))
|
using (PooledNetworkReader payloadReader = NetworkReaderPool.GetReader(msg.payload))
|
||||||
{
|
{
|
||||||
identity.OnUpdateVars(payloadReader, true);
|
identity.OnDeserializeAllSafely(payloadReader, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,7 +697,7 @@ internal static void OnUpdateVarsMessage(UpdateVarsMessage msg)
|
|||||||
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) && localObject != null)
|
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) && localObject != null)
|
||||||
{
|
{
|
||||||
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(msg.payload))
|
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(msg.payload))
|
||||||
localObject.OnUpdateVars(networkReader, false);
|
localObject.OnDeserializeAllSafely(networkReader, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -885,11 +885,6 @@ internal void HandleRPC(int componentIndex, int rpcHash, NetworkReader reader)
|
|||||||
HandleRemoteCall(componentIndex, rpcHash, MirrorInvokeType.ClientRpc, reader);
|
HandleRemoteCall(componentIndex, rpcHash, MirrorInvokeType.ClientRpc, reader);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void OnUpdateVars(NetworkReader reader, bool initialState)
|
|
||||||
{
|
|
||||||
OnDeserializeAllSafely(reader, initialState);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static NetworkIdentity previousLocalPlayer = null;
|
private static NetworkIdentity previousLocalPlayer = null;
|
||||||
internal void OnStartLocalPlayer()
|
internal void OnStartLocalPlayer()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user