Simplify conditional

This commit is contained in:
Paul Pacheco 2018-10-11 19:40:36 -05:00
parent e265ef3efd
commit 9a542e98cc

View File

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