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

@ -533,7 +533,7 @@ bool CAI_MoveProbe::TestGroundMove( const Vector &vecActualStart, const Vector &
for (;;)
{
float flStepSize = min( LOCAL_STEP_SIZE, pMoveTrace->flTotalDist - distClear );
float flStepSize = MIN( LOCAL_STEP_SIZE, pMoveTrace->flTotalDist - distClear );
if ( flStepSize < 0.001 )
break;
@ -648,7 +648,7 @@ bool CAI_MoveProbe::TestGroundMove( const Vector &vecActualStart, const Vector &
// and not a ledge above or below the target.
if (!(flags & AITGM_2D))
{
float threshold = max( 0.5f * GetHullHeight(), StepHeight() + 0.1 );
float threshold = MAX( 0.5f * GetHullHeight(), StepHeight() + 0.1 );
if (fabs(pMoveTrace->vEndPosition.z - vecDesiredEnd.z) > threshold)
{
#if 0
@ -1104,9 +1104,9 @@ Vector CAI_MoveProbe::CalcJumpLaunchVelocity(const Vector &startPos, const Vecto
float minHorzHeight = 0.5 * flGravity * (minHorzTime * 0.5) * (minHorzTime * 0.5);
// jump height must be enough to hang in the air
*pminHeight = max( *pminHeight, minHorzHeight );
*pminHeight = MAX( *pminHeight, minHorzHeight );
// jump height must be enough to cover the step up
*pminHeight = max( *pminHeight, stepHeight );
*pminHeight = MAX( *pminHeight, stepHeight );
// time from start to apex
float t0 = sqrt( ( 2.0 * *pminHeight) / flGravity );