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:
@ -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 )
|
||||
|
Reference in New Issue
Block a user