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