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