commit 0a345a76133b5a3c70152d59798a52dbf72c917c Author: /dev/humancontroller Date: Fri May 13 17:29:18 2011 +0200 a trigger_hurt multiplexing attempt diff --git a/src/game/g_local.h b/src/game/g_local.h index 7a371d1..c12432c 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -269,6 +269,7 @@ struct gentity_s int altSupportType; float altSupportRadius; int localBuildPointSetting; + int hurtTime; }; typedef enum diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c index 79bca29..6182c55 100644 --- a/src/game/g_trigger.c +++ b/src/game/g_trigger.c @@ -385,9 +385,19 @@ void hurt_touch( gentity_t *self, gentity_t *other, trace_t *trace ) if( !other->takedamage ) return; - if( self->timestamp > level.time ) + if( other->hurtTime == level.time ) return; + if( level.time < self->timestamp ) + { + if( ( ( self->spawnflags & 16 ) && self->timestamp == level.time + 1000 ) || + ( !( self->spawnflags & 16 ) && self->timestamp == level.time + FRAMETIME ) ) + { + } + else + return; + } + if( self->spawnflags & 16 ) self->timestamp = level.time + 1000; else @@ -403,6 +413,7 @@ void hurt_touch( gentity_t *self, gentity_t *other, trace_t *trace ) dflags = 0; G_Damage( other, self, self, NULL, NULL, self->damage, dflags, MOD_TRIGGER_HURT ); + other->hurtTime = level.time; } void SP_trigger_hurt( gentity_t *self )