Merge pull request #1008 from BjossiAlfreds/makrondeath-fix

Fixed despawning makron torso
This commit is contained in:
Yamagi 2023-05-13 15:21:32 +02:00 committed by GitHub
commit e0dd7c9d00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;