From f128c44e30efd56e29045ea6679e59afa9d45923 Mon Sep 17 00:00:00 2001 From: BjossiAlfreds Date: Tue, 9 May 2023 18:37:15 +0000 Subject: [PATCH] Fixed despawning makron torso --- src/game/monster/boss3/boss32.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/monster/boss3/boss32.c b/src/game/monster/boss3/boss32.c index 89967273..9614e3fa 100644 --- a/src/game/monster/boss3/boss32.c +++ b/src/game/monster/boss3/boss32.c @@ -833,7 +833,14 @@ makron_torso_think(edict_t *self) return; } - if (self->owner && self->owner->inuse && self->owner->deadflag != DEAD_DEAD) + /* detach from the makron if the legs are gone completely */ + if (self->owner && (!self->owner->inuse || (self->owner->health <= self->owner->gib_health))) + { + self->owner = NULL; + } + + /* if the makron is revived the torso was put back on him */ + if (self->owner && self->owner->deadflag != DEAD_DEAD) { G_FreeEdict(self); return;