Skip to content

Commit

Permalink
Improve hurt bar visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyLobo committed Jun 12, 2016
1 parent 65f0025 commit 947755c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mp/src/game/client/sdk/hud/sdk_hud_health.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ void CHudHealth::Paint()

if (flHurtAlpha && flHealthPercent < flHurtPercent)
{
float flHurtBarHeight = RemapValClamped(gpGlobals->curtime, m_flLastHealthChange, m_flLastHealthChange + flHurtLerpTime, GetTall(), flBarHeight);

surface()->DrawSetColor( Color(255, 0, 0, flHurtAlpha*255) );
surface()->DrawFilledRect( flMargin*2 + flHeartHeight + flHealthPercent * flBarWidth, GetTall()/2-flBarHeight/2, flMargin*2 + flHeartHeight + flHurtPercent * flBarWidth, GetTall()/2+flBarHeight/2 );
surface()->DrawFilledRect( flMargin*2 + flHeartHeight + flHealthPercent * flBarWidth, GetTall()/2-flHurtBarHeight/2, flMargin*2 + flHeartHeight + flHurtPercent * flBarWidth, GetTall()/2+flHurtBarHeight/2 );
}

surface()->DrawSetColor( Color(255, 255, 255, 255) );
Expand Down

0 comments on commit 947755c

Please sign in to comment.