Marek Fix
This commit is contained in:
@@ -31,6 +31,7 @@ namespace MegaKoop.Game.Networking
|
||||
private Quaternion remoteTargetRotation;
|
||||
private Vector3 remoteTargetVelocity;
|
||||
private bool haveRemoteState;
|
||||
private SteamCharacterNetworkBridge characterBridge;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -54,6 +55,13 @@ namespace MegaKoop.Game.Networking
|
||||
trackedNavMeshAgent = GetComponent<UnityEngine.AI.NavMeshAgent>();
|
||||
}
|
||||
|
||||
characterBridge = GetComponent<SteamCharacterNetworkBridge>();
|
||||
if (characterBridge != null)
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
remoteTargetPosition = targetTransform.position;
|
||||
remoteTargetRotation = targetTransform.rotation;
|
||||
remoteTargetVelocity = Vector3.zero;
|
||||
@@ -62,6 +70,12 @@ namespace MegaKoop.Game.Networking
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
characterBridge = GetComponent<SteamCharacterNetworkBridge>();
|
||||
if (characterBridge != null)
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
EnsureNetworkManager();
|
||||
RegisterHandlers();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user