prboom-plus/prboom-hbar-all.diff

27 lines
889 B
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-05-01 09:53:49.000000000 +0200
Category: improvement
Status: sent Wed, 1 May 2013 14:28:44 +0200
Show the health bar for all destructible items (including
barrels and Lost Souls).
---
src/gl_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: prboom2/src/gl_main.c
===================================================================
--- prboom2.orig/src/gl_main.c
+++ prboom2/src/gl_main.c
@@ -2399,7 +2399,8 @@ static void gld_DrawSprite(GLSprite *spr
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;