Skip to content

Commit

Permalink
Implement ValveSoftware#963
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitl committed Mar 9, 2025
1 parent 630302d commit 53a9c63
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/game/server/nav_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,17 @@ bool CNavMesh::GetGroundHeight( const Vector &pos, float *height, Vector *normal
{
VPROF( "CNavMesh::GetGroundHeight" );

#ifdef BDSBASE
// IS_NAN complains when trying to read from &pos, so it needs a throwaway variable.
Vector temp = pos;
for (int i = 0; i < 3; i++) {
if (IS_NAN(temp[i])) {
DevMsg("GetGroundHeight got NaN as position input!\n");
return false;
}
}
#endif

const float flMaxOffset = 100.0f;

CTraceFilterGroundEntities filter( NULL, COLLISION_GROUP_NONE, WALK_THRU_EVERYTHING );
Expand Down

0 comments on commit 53a9c63

Please sign in to comment.