Show cloak/invulnerability time remaining on HUD
This commit is contained in:
parent
403d412000
commit
88ec115c38
|
@ -1412,9 +1412,10 @@ static void hud_show_cloak_invuln(void)
|
|||
else
|
||||
y -= LINE_SPACING*4;
|
||||
|
||||
if (Players[Player_num].cloak_time+CLOAK_TIME_MAX-GameTime64 > F1_0*3 || GameTime64 & 0x8000)
|
||||
const fix64 effect_end = Players[Player_num].cloak_time+CLOAK_TIME_MAX-GameTime64;
|
||||
if (effect_end > F1_0*3 || GameTime64 & 0x8000)
|
||||
{
|
||||
gr_string(FSPACX(1), y, TXT_CLOAKED);
|
||||
gr_printf(FSPACX(1), y, "%s: %lu", TXT_CLOAKED, effect_end / F1_0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1426,9 +1427,10 @@ static void hud_show_cloak_invuln(void)
|
|||
else
|
||||
y -= LINE_SPACING*5;
|
||||
|
||||
if (Players[Player_num].invulnerable_time+INVULNERABLE_TIME_MAX-GameTime64 > F1_0*4 || GameTime64 & 0x8000)
|
||||
const fix64 effect_end = Players[Player_num].invulnerable_time+INVULNERABLE_TIME_MAX-GameTime64;
|
||||
if (effect_end > F1_0*4 || GameTime64 & 0x8000)
|
||||
{
|
||||
gr_string(FSPACX(1), y, TXT_INVULNERABLE);
|
||||
gr_printf(FSPACX(1), y, "%s: %lu", TXT_INVULNERABLE, effect_end / F1_0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue