mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-11 05:58:00 +08:00
Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.
This commit is contained in:
1 parent
b9b7f08197
commit
3e7f7bdabd
300 files changed
+1041
-1084
No files matched your search
@@ -966,7 +966,7 @@ void CBaseCombatWeapon::SetActivity( Activity act, float duration )
|
||||
{
|
||||
// FIXME: does this even make sense in non-shoot animations?
|
||||
m_flPlaybackRate = SequenceDuration( sequence ) / duration;
|
||||
m_flPlaybackRate = min( m_flPlaybackRate, 12.0); // FIXME; magic number!, network encoding range
|
||||
m_flPlaybackRate = fpmin( m_flPlaybackRate, 12.0); // FIXME; magic number!, network encoding range
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1819,7 +1819,7 @@ bool CBaseCombatWeapon::DefaultReload( int iClipSize1, int iClipSize2, int iActi
|
||||
if ( UsesClipsForAmmo1() )
|
||||
{
|
||||
// need to reload primary clip?
|
||||
int primary = min(iClipSize1 - m_iClip1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
|
||||
int primary = MIN(iClipSize1 - m_iClip1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
|
||||
if ( primary != 0 )
|
||||
{
|
||||
bReload = true;
|
||||
@@ -1829,7 +1829,7 @@ bool CBaseCombatWeapon::DefaultReload( int iClipSize1, int iClipSize2, int iActi
|
||||
if ( UsesClipsForAmmo2() )
|
||||
{
|
||||
// need to reload secondary clip?
|
||||
int secondary = min(iClipSize2 - m_iClip2, pOwner->GetAmmoCount(m_iSecondaryAmmoType));
|
||||
int secondary = MIN(iClipSize2 - m_iClip2, pOwner->GetAmmoCount(m_iSecondaryAmmoType));
|
||||
if ( secondary != 0 )
|
||||
{
|
||||
bReload = true;
|
||||
@@ -1981,7 +1981,7 @@ void CBaseCombatWeapon::FinishReload( void )
|
||||
// If I use primary clips, reload primary
|
||||
if ( UsesClipsForAmmo1() )
|
||||
{
|
||||
int primary = min( GetMaxClip1() - m_iClip1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
|
||||
int primary = MIN( GetMaxClip1() - m_iClip1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
|
||||
m_iClip1 += primary;
|
||||
pOwner->RemoveAmmo( primary, m_iPrimaryAmmoType);
|
||||
}
|
||||
@@ -1989,7 +1989,7 @@ void CBaseCombatWeapon::FinishReload( void )
|
||||
// If I use secondary clips, reload secondary
|
||||
if ( UsesClipsForAmmo2() )
|
||||
{
|
||||
int secondary = min( GetMaxClip2() - m_iClip2, pOwner->GetAmmoCount(m_iSecondaryAmmoType));
|
||||
int secondary = MIN( GetMaxClip2() - m_iClip2, pOwner->GetAmmoCount(m_iSecondaryAmmoType));
|
||||
m_iClip2 += secondary;
|
||||
pOwner->RemoveAmmo( secondary, m_iSecondaryAmmoType );
|
||||
}
|
||||
@@ -2062,12 +2062,12 @@ void CBaseCombatWeapon::PrimaryAttack( void )
|
||||
// Make sure we don't fire more than the amount in the clip
|
||||
if ( UsesClipsForAmmo1() )
|
||||
{
|
||||
info.m_iShots = min( info.m_iShots, m_iClip1 );
|
||||
info.m_iShots = MIN( info.m_iShots, m_iClip1 );
|
||||
m_iClip1 -= info.m_iShots;
|
||||
}
|
||||
else
|
||||
{
|
||||
info.m_iShots = min( info.m_iShots, pPlayer->GetAmmoCount( m_iPrimaryAmmoType ) );
|
||||
info.m_iShots = MIN( info.m_iShots, pPlayer->GetAmmoCount( m_iPrimaryAmmoType ) );
|
||||
pPlayer->RemoveAmmo( info.m_iShots, m_iPrimaryAmmoType );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user