From 0e00bb0d9fc9ca792856362bd2ff6c9310bcaf44 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sat, 17 Dec 2016 11:04:34 +0100 Subject: [PATCH] Only start monsters with max_health == health if max_health isn't set. I dont' know if any monsters start with max_health != health, but this looks more correct. This was reported by maraakate in yquake2 issue 160. --- src/g_monster.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/g_monster.c b/src/g_monster.c index 8af4304..0d7dfba 100644 --- a/src/g_monster.c +++ b/src/g_monster.c @@ -948,7 +948,12 @@ monster_start(edict_t *self) self->takedamage = DAMAGE_AIM; self->air_finished = level.time + 12; self->use = monster_use; - self->max_health = self->health; + + if(!self->max_health) + { + self->max_health = self->health; + } + self->clipmask = MASK_MONSTERSOLID; self->s.skinnum = 0;