Client: add a subtle tint to the damage display. Set cg_damageFill to tweak.
This commit is contained in:
parent
f2aba72c0c
commit
5324616382
1 changed files with 10 additions and 0 deletions
|
@ -3,6 +3,8 @@ var string g_damage_spr_b;
|
|||
var string g_damage_spr_l;
|
||||
var string g_damage_spr_r;
|
||||
|
||||
var float autocvar_cg_damageFill = 0.25f;
|
||||
|
||||
void
|
||||
Damage_Precache(void)
|
||||
{
|
||||
|
@ -12,6 +14,8 @@ Damage_Precache(void)
|
|||
g_damage_spr_l = spriteframe("sprites/640_pain.spr", 3, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HUD_DamageNotify_Check();
|
||||
void
|
||||
Damage_Draw(void)
|
||||
|
@ -58,5 +62,11 @@ Damage_Draw(void)
|
|||
[48,128], [1,1,1], rt_alpha, DRAWFLAG_ADDITIVE);
|
||||
}
|
||||
|
||||
if (autocvar_cg_damageFill > 0.0) {
|
||||
vector finalColor = [1,1,1];
|
||||
finalColor[1] = finalColor[2] = 1.0 - (pSeat->m_flDamageAlpha * autocvar_cg_damageFill);
|
||||
drawpic(video_mins, "fade_modulate", video_res, finalColor, 1.0, DRAWFLAG_NORMAL);
|
||||
}
|
||||
|
||||
pSeat->m_flDamageAlpha -= clframetime;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue