From 23cbffbd3952ff808c90e3be54e9ecabc228a17c Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sat, 17 Dec 2016 09:33:27 +0100 Subject: [PATCH] Set self->targetname to NULL when the head is thrown off This should be a noop, since heads are only removed when an entity is dying or dead. Noticed by maraakate and part of yquake2 issue #160. --- src/g_misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/g_misc.c b/src/g_misc.c index 6000f09..0d253ab 100644 --- a/src/g_misc.c +++ b/src/g_misc.c @@ -257,6 +257,7 @@ ThrowHead(edict_t *self, char *gibname, int damage, int type) self->flags |= FL_NO_KNOCKBACK; self->svflags &= ~SVF_MONSTER; self->takedamage = DAMAGE_YES; + self->targetname = NULL; self->die = gib_die; if (type == GIB_ORGANIC)