From 0a7005b38ad33e4f826d3a99b9b3d7f4bdf53158 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 22 Mar 2005 12:49:53 +0000 Subject: [PATCH] redesigned trigger_hurt timing a different way - now independently tracks last hurt time in each affected entity (so no matter what other entities fell in recently, you'll still get killed by a void death trigger) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@332 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/g_triggers.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/qcsrc/gamec/g_triggers.c b/qcsrc/gamec/g_triggers.c index 1f1ef70e8..e2bf50e8a 100644 --- a/qcsrc/gamec/g_triggers.c +++ b/qcsrc/gamec/g_triggers.c @@ -344,25 +344,13 @@ void() trigger_counter = self.use = counter_use; }; -void() hurt_on = -{ - self.solid = SOLID_TRIGGER; - self.nextthink = -1; -}; - -void() hurt_off = -{ - self.solid = SOLID_NOT; - self.think = hurt_on; - self.nextthink = time + 1; -}; - +.float triggerhurttime; void() hurt_touch = { if (other.takedamage) + if (other.triggerhurttime < time) { - self.think = hurt_off; - self.nextthink = time; + other.triggerhurttime = time + 1; Damage (other, self, self, self.dmg, DEATH_HURTTRIGGER, '0 0 0', '0 0 0'); } -- 2.39.2