diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 16:54:18 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:10 +0100 |
commit | 2a5738a0190b7867f4cadca226c2ccda11ee6953 (patch) | |
tree | 337da071267d91cce0d2fbecf440a7d452d2aa04 | |
parent | 293969ceba8548db4f26807a5727aac916f1b774 (diff) |
fix trigger linkage after trap_SetBrushModel(); always allow firing at a trigger_hurt
fixes are courtesy of ==Troy==
-rw-r--r-- | src/game/g_trigger.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 ); } |