1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.

This commit is contained in:
Scott Ehlert
2011-04-28 01:29:36 -05:00
parent 94dd57587b
commit 79f4a53df6
300 changed files with 1041 additions and 1084 deletions

View File

@ -91,13 +91,13 @@ bool CAI_LocalNavigator::MoveCalcDirect( AILocalMoveGoal_t *pMoveGoal, bool bOnl
CAI_Motor *pMotor = GetOuter()->GetMotor();
float minCheckDist = pMotor->MinCheckDist();
float probeDist = m_pPlaneSolver->CalcProbeDist( pMoveGoal->speed ); // having this match steering allows one fewer traces
float checkDist = max( minCheckDist, probeDist );
float checkStepDist = max( 16.0, probeDist * 0.5 );
float checkDist = MAX( minCheckDist, probeDist );
float checkStepDist = MAX( 16.0, probeDist * 0.5 );
if ( pMoveGoal->flags & ( AILMG_TARGET_IS_TRANSITION | AILMG_TARGET_IS_GOAL ) )
{
// clamp checkDist to be no farther than max distance to goal
checkDist = min( checkDist, pMoveGoal->maxDist );
checkDist = MIN( checkDist, pMoveGoal->maxDist );
}
if ( checkDist <= 0.0 )