Use CHECK_DEBUG over ASSERT in normalized direction checks

This commit is contained in:
2024-08-07 21:15:34 +03:00
parent a066e0078d
commit f759f94cfa
6 changed files with 40 additions and 40 deletions

View File

@@ -1963,7 +1963,7 @@ bool TerrainPatch::UpdateCollision()
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -1974,7 +1974,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, Vector3& resultHitNormal, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -1992,7 +1992,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, TerrainChunk*& resultChunk, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -2030,7 +2030,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, RayCastHit& hitInfo, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;