Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.

This commit is contained in:
Scott Ehlert committed 2011-04-28 01:30:37 -05:00
1 parent 6c38e2e589
commit 4caefcbcba
300 files changed
+1041 -1084

No files matched your search

+5 -5
View File
@@ -520,7 +520,7 @@ void C_ClientRagdoll::FadeOut( void )
int iAlpha = GetRenderColor().a;
int iFadeSpeed = ( g_RagdollLVManager.IsLowViolence() ) ? g_ragdoll_lvfadespeed.GetInt() : g_ragdoll_fadespeed.GetInt();
iAlpha = max( iAlpha - ( iFadeSpeed * gpGlobals->frametime ), 0 );
iAlpha = MAX( iAlpha - ( iFadeSpeed * gpGlobals->frametime ), 0 );
SetRenderMode( kRenderTransAlpha );
SetRenderColorA( iAlpha );
@@ -998,7 +998,7 @@ CStudioHdr *C_BaseAnimating::OnNewModel()
}
}
int boneControllerCount = min( hdr->numbonecontrollers(), ARRAYSIZE( m_flEncodedController ) );
int boneControllerCount = MIN( hdr->numbonecontrollers(), ARRAYSIZE( m_flEncodedController ) );
m_iv_flEncodedController.SetMaxCount( boneControllerCount );
@@ -2146,7 +2146,7 @@ void C_BaseAnimating::CalculateIKLocks( float currentTime )
VectorMA( estGround, pTarget->est.height, up, p1 );
VectorMA( estGround, -pTarget->est.height, up, p2 );
float r = max( pTarget->est.radius, 1);
float r = MAX( pTarget->est.radius, 1);
// don't IK to other characters
ray.Init( p1, p2, Vector(-r,-r,0), Vector(r,r,r*2) );
@@ -4609,7 +4609,7 @@ float C_BaseAnimating::GetAnimTimeInterval( void ) const
{
#define MAX_ANIMTIME_INTERVAL 0.2f
float flInterval = min( gpGlobals->curtime - m_flAnimTime, MAX_ANIMTIME_INTERVAL );
float flInterval = MIN( gpGlobals->curtime - m_flAnimTime, MAX_ANIMTIME_INTERVAL );
return flInterval;
}
@@ -4841,7 +4841,7 @@ float C_BaseAnimating::FrameAdvance( float flInterval )
addcycle = (serverAdvance + addcycle) / 2;
const float MAX_CYCLE_ADJUSTMENT = 0.1f;
addcycle = min( MAX_CYCLE_ADJUSTMENT, addcycle );// Don't do too big of a jump; it's too jarring as well.
addcycle = MIN( MAX_CYCLE_ADJUSTMENT, addcycle );// Don't do too big of a jump; it's too jarring as well.
DevMsg( 2, "(%d): Cycle latch used to correct %.2f in to %.2f instead of %.2f.\n",
entindex(), GetCycle(), GetCycle() + addcycle, GetCycle() + originalAdvance );