mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.
This commit is contained in:
@ -3445,7 +3445,7 @@ void CAI_BaseNPC::RebalanceThinks()
|
||||
|
||||
int iMaxThinkersPerTick = static_cast<int>(ceil( (float)( rebalanceCandidates.Count() + 1 ) / (float)iTicksPer10Hz )); // +1 to account for "this"
|
||||
|
||||
int iCurTickDistributing = min( gpGlobals->tickcount, rebalanceCandidates[0].iNextThinkTick );
|
||||
int iCurTickDistributing = MIN( gpGlobals->tickcount, rebalanceCandidates[0].iNextThinkTick );
|
||||
int iRemainingThinksToDistribute = iMaxThinkersPerTick - 1; // Start with one fewer first time because "this" is
|
||||
// always gets a slot in the current tick to avoid complications
|
||||
// in the calculation of "last think"
|
||||
@ -5499,7 +5499,7 @@ void CAI_BaseNPC::GatherEnemyConditions( CBaseEntity *pEnemy )
|
||||
float tooFar = m_flDistTooFar;
|
||||
if ( GetActiveWeapon() && HasCondition(COND_SEE_ENEMY) )
|
||||
{
|
||||
tooFar = max( m_flDistTooFar, GetActiveWeapon()->m_fMaxRange1 );
|
||||
tooFar = MAX( m_flDistTooFar, GetActiveWeapon()->m_fMaxRange1 );
|
||||
}
|
||||
|
||||
if ( flDistToEnemy >= tooFar )
|
||||
|
Reference in New Issue
Block a user