From 29d28eeb204723d48ac881e488224f3ff32f9f52 Mon Sep 17 00:00:00 2001 From: belplaton Date: Fri, 23 Jan 2026 20:21:53 +0300 Subject: [PATCH] fix --- .../Object/NetworkBehaviour/NetworkBehaviour.Prediction.cs | 4 ++-- .../Runtime/Object/NetworkObject/NetworkObject.Prediction.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.Prediction.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.Prediction.cs index ffd213bf..e5e83d19 100644 --- a/Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.Prediction.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.Prediction.cs @@ -478,11 +478,11 @@ private bool HasServerRigidbodyTransformChanged(bool updateLastValues) const float angleDistance = 0.2f; bool anyChanged = false; - anyChanged |= (transform.position - _lastCheckedTransformProperties.Position).sqrMagnitude > v3Distance; + anyChanged |= (transform.position - (Vector3)_lastCheckedTransformProperties.Position).sqrMagnitude > v3Distance; if (!anyChanged) anyChanged |= transform.rotation.Angle(_lastCheckedTransformProperties.Rotation, precise: true) > angleDistance; if (!anyChanged) - anyChanged |= (transform.localScale - _lastCheckedTransformProperties.Scale).sqrMagnitude > v3Distance; + anyChanged |= (transform.localScale - (Vector3)_lastCheckedTransformProperties.Scale).sqrMagnitude > v3Distance; // If transform changed update last values. if (updateLastValues && anyChanged) diff --git a/Assets/FishNet/Runtime/Object/NetworkObject/NetworkObject.Prediction.cs b/Assets/FishNet/Runtime/Object/NetworkObject/NetworkObject.Prediction.cs index fb97925d..73b40ca2 100644 --- a/Assets/FishNet/Runtime/Object/NetworkObject/NetworkObject.Prediction.cs +++ b/Assets/FishNet/Runtime/Object/NetworkObject/NetworkObject.Prediction.cs @@ -544,7 +544,7 @@ bool LHasTransformChanged() const float v3Distance = 0.000025f; const float angleDistance = 0.2f; - bool hasChanged = (transform.position - prtp.Properties.Position).sqrMagnitude >= v3Distance; + bool hasChanged = (transform.position - (Vector3)prtp.Properties.Position).sqrMagnitude >= v3Distance; if (!hasChanged) hasChanged = transform.rotation.Angle(prtp.Properties.Rotation, precise: true) >= angleDistance;