1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 12:36:05 +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

@ -246,7 +246,7 @@ void CSprite::ComputeWorldSpaceSurroundingBox( Vector *pVecWorldMins, Vector *pV
// Find the height and width of the source of the sprite
float width = modelinfo->GetModelSpriteWidth( GetModel() );
float height = modelinfo->GetModelSpriteHeight( GetModel() );
flScale *= max( width, height );
flScale *= MAX( width, height );
}
pVecWorldMins->Init( -flScale, -flScale, -flScale );
@ -642,7 +642,7 @@ void CSprite::GetRenderBounds( Vector &vecMins, Vector &vecMaxs )
if ( m_bWorldSpaceScale == false )
{
CEngineSprite *psprite = (CEngineSprite *) modelinfo->GetModelExtraData( GetModel() );
float flSize = max( psprite->GetWidth(), psprite->GetHeight() );
float flSize = MAX( psprite->GetWidth(), psprite->GetHeight() );
flScale *= flSize;
}
@ -749,7 +749,7 @@ int CSprite::DrawModel( int flags )
if ( m_bWorldSpaceScale )
{
CEngineSprite *psprite = ( CEngineSprite * )modelinfo->GetModelExtraData( GetModel() );
float flMinSize = min( psprite->GetWidth(), psprite->GetHeight() );
float flMinSize = MIN( psprite->GetWidth(), psprite->GetHeight() );
renderscale /= flMinSize;
}