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.
This commit is contained in:
Yamagi Burmeister 2016-12-17 11:04:34 +01:00
parent be91d27005
commit 0e00bb0d9f

View file

@ -948,7 +948,12 @@ monster_start(edict_t *self)
self->takedamage = DAMAGE_AIM;
self->air_finished = level.time + 12;
self->use = monster_use;
if(!self->max_health)
{
self->max_health = self->health;
}
self->clipmask = MASK_MONSTERSOLID;
self->s.skinnum = 0;