add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+2 -14
View File
@@ -16,9 +16,7 @@
#include "mathlib/ssemath.h"
#include "nav_area.h"
#ifdef STAGING_ONLY
extern int g_DebugPathfindCounter;
#endif
//-------------------------------------------------------------------------------------------------------------------
@@ -110,9 +108,7 @@ bool NavAreaBuildPath( CNavArea *startArea, CNavArea *goalArea, const Vector *go
*closestArea = startArea;
}
#ifdef STAGING_ONLY
bool isDebug = ( g_DebugPathfindCounter-- > 0 );
#endif
if (startArea == NULL)
return false;
@@ -158,12 +154,10 @@ bool NavAreaBuildPath( CNavArea *startArea, CNavArea *goalArea, const Vector *go
// get next area to check
CNavArea *area = CNavArea::PopOpenList();
#ifdef STAGING_ONLY
if ( isDebug )
{
area->DrawFilled( 0, 255, 0, 128, 30.0f );
}
#endif
// don't consider blocked areas
if ( area->IsBlocked( teamID, ignoreNavBlockers ) )
@@ -345,13 +339,7 @@ bool NavAreaBuildPath( CNavArea *startArea, CNavArea *goalArea, const Vector *go
continue;
float newCostSoFar = costFunc( newArea, area, ladder, elevator, length );
// NaNs really mess this function up causing tough to track down hangs. If
// we get inf back, clamp it down to a really high number.
DebuggerBreakOnNaN_StagingOnly( newCostSoFar );
if ( IS_NAN( newCostSoFar ) )
newCostSoFar = 1e30f;
// check if cost functor says this area is a dead-end
if ( newCostSoFar < 0.0f )
continue;
@@ -364,7 +352,7 @@ bool NavAreaBuildPath( CNavArea *startArea, CNavArea *goalArea, const Vector *go
// Make sure that any jump to a new area incurs some pathfinsing
// cost, to avoid us spinning our wheels over insignificant cost
// benefit, floating point precision bug, or busted cost functor.
float minNewCostSoFar = area->GetCostSoFar() * 1.00001f + 0.00001f;
float minNewCostSoFar = area->GetCostSoFar() * 1.00001 + 0.00001;
newCostSoFar = Max( newCostSoFar, minNewCostSoFar );
// stop if path length limit reached