mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- added the missing TNT1A0 check for icon-less keys.
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
This commit is contained in:
parent
fbc441673a
commit
1406c11f8e
2 changed files with 5 additions and 2 deletions
|
@ -701,6 +701,7 @@ void DrawHUD()
|
|||
althud->IntVar("statspace") = statspace;
|
||||
althud->IntVar("healthpic") = healthpic? healthpic->id.GetIndex() : -1;
|
||||
althud->IntVar("berserkpic") = berserkpic? berserkpic->id.GetIndex() : -1;
|
||||
althud->IntVar("tnt1a0") = tnt1a0.GetIndex();
|
||||
althud->PointerVar<FFont>("HUDFont") = HudFont;
|
||||
|
||||
if (!automapactive)
|
||||
|
|
|
@ -43,6 +43,7 @@ DVector2 AM_GetPosition();
|
|||
class AltHud
|
||||
{
|
||||
TextureID healthPic, berserkPic;
|
||||
TextureID tnt1a0;
|
||||
int hudwidth, hudheight;
|
||||
int statspace;
|
||||
Font HudFont; // The font for the health and armor display
|
||||
|
@ -297,7 +298,8 @@ class AltHud
|
|||
if (state != null) icon = state.GetSpriteTexture(0);
|
||||
else icon.SetNull();
|
||||
}
|
||||
if (icon.isNull()) icon = inv.Icon;
|
||||
// missing sprites map to TNT1A0. So if that gets encountered, use the default icon instead.
|
||||
if (icon.isNull() || icon == tnt1a0) icon = inv.Icon;
|
||||
|
||||
if (icon.isValid())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue