1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +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:30:09 -05:00
parent b9b7f08197
commit 3e7f7bdabd
300 changed files with 1041 additions and 1084 deletions

View File

@ -1612,7 +1612,7 @@ CON_COMMAND( physics_budget, "Times the cost of each active object" )
lastTime = elapsed;
}
totalTime = max( totalTime, 0.001 );
totalTime = MAX( totalTime, 0.001 );
for ( i = 0; i < ents.Count(); i++ )
{
float fraction = times[i] / totalTime;
@ -1822,10 +1822,10 @@ void CCollisionEvent::PreCollision( vcollisionevent_t *pEvent )
// so make it fairly small and have a tiny collision instead.
pObject->GetVelocity( &velocity, &angVel );
float len = VectorNormalize(velocity);
len = max( len, 10 );
len = MAX( len, 10 );
velocity *= len;
len = VectorNormalize(angVel);
len = max( len, 1 );
len = MAX( len, 1 );
angVel *= len;
pObject->SetVelocity( &velocity, &angVel );
}