From 4374ff6ce929deedd94f419efc4a1b70f54be1f8 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 10 May 2011 11:11:37 +0000 Subject: [PATCH] Fix spawnflag behaviour for trigger_hurt, patch by DevHC --- code/game/g_trigger.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/g_trigger.c b/code/game/g_trigger.c index 5a9538c3..94de3fbf 100644 --- a/code/game/g_trigger.c +++ b/code/game/g_trigger.c @@ -392,12 +392,13 @@ void SP_trigger_hurt( gentity_t *self ) { self->r.contents = CONTENTS_TRIGGER; - if ( self->spawnflags & 2 ) { - self->use = hurt_use; - } + self->use = hurt_use; // link in to the world if starting active - if ( ! (self->spawnflags & 1) ) { + if ( self->spawnflags & 1 ) { + trap_UnlinkEntity (self); + } + else { trap_LinkEntity (self); } }