Remove duplicate loop.

This commit is contained in:
Night Owl 2016-08-03 02:05:15 +05:00
parent 9e262a0e14
commit f614c73318

View File

@ -385,17 +385,6 @@ int CHudHealth::DrawDamage( float flTime )
ScaleColors( r, g, b, a );
// Draw all the items
for( i = 0; i < NUM_DMG_TYPES; i++ )
{
if (m_bitsDamage & giDmgFlags[i])
{
pdmg = &m_dmg[i];
SPR_Set(gHUD.GetSprite(m_HUD_dmg_bio + i), r, g, b );
SPR_DrawAdditive(0, pdmg->x, pdmg->y, &gHUD.GetSpriteRect(m_HUD_dmg_bio + i));
}
}
// check for bits that should be expired
for( i = 0; i < NUM_DMG_TYPES; i++ )
{
@ -403,6 +392,10 @@ int CHudHealth::DrawDamage( float flTime )
{
pdmg = &m_dmg[i];
// Draw all the items
SPR_Set( gHUD.GetSprite( m_HUD_dmg_bio + i ), r, g, b );
SPR_DrawAdditive( 0, pdmg->x, pdmg->y, &gHUD.GetSpriteRect( m_HUD_dmg_bio + i ) );
pdmg->fExpire = min( flTime + DMG_IMAGE_LIFE, pdmg->fExpire );
if( pdmg->fExpire <= flTime // when the time has expired