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:30:09 -05:00
parent b9b7f08197
commit 3e7f7bdabd
300 changed files with 1041 additions and 1084 deletions

View File

@ -271,7 +271,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 );
@ -669,7 +669,7 @@ void CSprite::GetRenderBounds( Vector &vecMins, Vector &vecMaxs )
CEngineSprite *psprite = (CEngineSprite *) modelinfo->GetModelExtraData( GetModel() );
if ( psprite )
{
float flSize = max( psprite->GetWidth(), psprite->GetHeight() );
float flSize = MAX( psprite->GetWidth(), psprite->GetHeight() );
flScale *= flSize;
}
}
@ -786,7 +786,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;
}