game: More More More max()->MAX() and min()->MIN()

This commit is contained in:
SanyaSho 2022-08-10 22:18:42 +03:00
parent d330813654
commit a6d7b5d63b
2 changed files with 4 additions and 4 deletions

View File

@ -124,8 +124,8 @@ void CHudDemomanChargeMeter::OnTick( void )
if ( flChargeBeginTime > 0 )
{
float flTimeCharged = max( 0, gpGlobals->curtime - flChargeBeginTime );
float flPercentCharged = min( 1.0, flTimeCharged / flChargeMaxTime );
float flTimeCharged = MAX( 0, gpGlobals->curtime - flChargeBeginTime );
float flPercentCharged = MIN( 1.0, flTimeCharged / flChargeMaxTime );
m_pChargeMeter->SetProgress( flPercentCharged );
}
@ -135,4 +135,4 @@ void CHudDemomanChargeMeter::OnTick( void )
}
}
}
}
}

View File

@ -948,7 +948,7 @@ void CTFFlameEntity::OnCollide( CBaseEntity *pOther )
flMultiplier = RemapValClamped( flDistance, tf_flamethrower_maxdamagedist.GetFloat()/2, tf_flamethrower_maxdamagedist.GetFloat(), 1.0, 0.25 );
}
float flDamage = m_flDmgAmount * flMultiplier;
flDamage = max( flDamage, 1.0 );
flDamage = MAX( flDamage, 1.0 );
if ( tf_debug_flamethrower.GetInt() )
{
Msg( "Flame touch dmg: %.1f\n", flDamage );