diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index 3fe49f72a..bd4410fcb 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -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("HUDFont") = HudFont; if (!automapactive) diff --git a/wadsrc/static/zscript/statusbar/alt_hud.txt b/wadsrc/static/zscript/statusbar/alt_hud.txt index e4691a655..b016677a2 100644 --- a/wadsrc/static/zscript/statusbar/alt_hud.txt +++ b/wadsrc/static/zscript/statusbar/alt_hud.txt @@ -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,9 +298,10 @@ 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()) + if (icon.isValid()) { DrawImageToBox(icon, x, y, 8, 10); return true;