From a0bae535928cbce4eb9da8dd5d33b473776c9693 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 1 May 2013 09:53:49 +0200 Subject: [PATCH 1/2] Show health bar for all destructible mobjs References: https://github.com/coelckers/prboom-plus/pull/274 Show the health bar for all destructible items, especially so including barrels and Lost Souls. --- prboom2/src/gl_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git prboom2/src/gl_main.c prboom2/src/gl_main.c index 20712b7e..e2402e16 100644 --- prboom2/src/gl_main.c +++ prboom2/src/gl_main.c @@ -2328,7 +2328,8 @@ static void gld_DrawSprite(GLSprite *sprite) static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) { - if (((thing->flags & (MF_COUNTKILL | MF_CORPSE)) == MF_COUNTKILL) && (thing->health > 0)) + if ((thing->flags & MF_SHOOTABLE) && thing->info->spawnhealth > 0 && + thing->health > 0) { GLHealthBar hbar; int health_percent = thing->health * 100 / thing->info->spawnhealth; -- 2.31.1