Marek Fix

This commit is contained in:
Dominik G.
2025-10-28 12:04:22 +01:00
parent 0cb9be4070
commit e2fa430d50
6 changed files with 402 additions and 419 deletions

View File

@@ -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();
}