mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Simplify conditional
This commit is contained in:
parent
e265ef3efd
commit
9a542e98cc
@ -920,24 +920,16 @@ bool CheckVelocityChanged()
|
||||
{
|
||||
return Mathf.Abs(m_RigidBody2D.velocity.sqrMagnitude - m_PrevVelocity) >= m_VelocityThreshold;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case TransformSyncMode.SyncRigidbody3D:
|
||||
if (m_RigidBody3D && m_VelocityThreshold > 0)
|
||||
{
|
||||
return Mathf.Abs(m_RigidBody3D.velocity.sqrMagnitude - m_PrevVelocity) >= m_VelocityThreshold;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void FixedUpdateClient()
|
||||
|
Loading…
Reference in New Issue
Block a user