mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Remove duplicate loop.
This commit is contained in:
parent
9e262a0e14
commit
f614c73318
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user