From c8f022584a47133720d8c4e146a92e101b966d24 Mon Sep 17 00:00:00 2001 From: mischa Date: Thu, 14 Mar 2024 14:48:15 +0800 Subject: [PATCH] inlining --- .../Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs b/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs index d09c0f647..6fee7c59e 100644 --- a/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs +++ b/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs @@ -10,6 +10,7 @@ // instead of real physics. It's not 100% correct - but it sure is fast! using System; using System.Collections.Generic; +using System.Runtime.CompilerServices; using UnityEngine; namespace Mirror @@ -372,6 +373,7 @@ void UpdateServer() } // movement detection is virtual, in case projects want to use other methods. + [MethodImpl(MethodImplOptions.AggressiveInlining)] protected virtual bool IsMoving() => // straight forward implementation // predictedRigidbody.velocity.magnitude >= motionSmoothingVelocityThreshold ||