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:29:22 -05:00
parent 88dd2ac536
commit 7f4855ae1f
265 changed files with 904 additions and 945 deletions

View File

@ -1152,7 +1152,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;
@ -1333,10 +1333,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 );
}