forked from pool/prboom-plus
Jan Engelhardt
f16fbe1737
OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=36
29 lines
971 B
Diff
29 lines
971 B
Diff
From 814146aab795b0c2d693e03027993d91c9db6f3e Mon Sep 17 00:00:00 2001
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: Wed, 1 May 2013 09:53:49 +0200
|
|
Subject: [PATCH 3/4] Show health bar for all destructible mobjs
|
|
|
|
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 8fbceb4f..0a52a0b5 100644
|
|
--- prboom2/src/gl_main.c
|
|
+++ prboom2/src/gl_main.c
|
|
@@ -2331,7 +2331,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.30.2
|
|
|