From 2a5738a0190b7867f4cadca226c2ccda11ee6953 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 13 Jul 2014 16:54:18 +0200 Subject: fix trigger linkage after trap_SetBrushModel(); always allow firing at a trigger_hurt fixes are courtesy of ==Troy== --- src/game/g_trigger.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c index 267bcad7..31fcf6d6 100644 --- a/src/game/g_trigger.c +++ b/src/game/g_trigger.c @@ -409,11 +409,12 @@ 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 ); } @@ -1072,7 +1073,9 @@ void SP_trigger_heal( gentity_t *self ) InitTrigger( self ); // link in to the world if starting active - if( !( self->spawnflags & 1 ) ) + if( self->spawnflags & 1 ) + trap_UnlinkEntity( self ); + else trap_LinkEntity( self ); } -- cgit