From b412637b2cb77bc8d55f4fc0a4a95737293391a9 Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 28 Aug 2009 13:36:35 +0000 Subject: [PATCH] jumppads: do not touch pushltime on non-players git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7548 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/t_jumppads.qc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/server/t_jumppads.qc b/data/qcsrc/server/t_jumppads.qc index 9dc1390f0..26501b342 100644 --- a/data/qcsrc/server/t_jumppads.qc +++ b/data/qcsrc/server/t_jumppads.qc @@ -150,13 +150,16 @@ void trigger_push_touch() self.movedir = trigger_push_calculatevelocity(other.origin, self.enemy, self.height); other.flags &~= FL_ONGROUND; - // reset tracking of oldvelocity for impact damage (sudden velocity changes) - other.oldvelocity = other.velocity = self.movedir; + + other.velocity = self.movedir; UpdateCSQCProjectile(other); if (other.classname == "player") { + // reset tracking of oldvelocity for impact damage (sudden velocity changes) + other.oldvelocity = other.velocity; + if(self.pushltime < time) // prevent "snorring" sound when a player hits the jumppad more than once { // flash when activated @@ -187,6 +190,9 @@ void trigger_push_touch() other.lastteleporttime = time; else other.jumppadcount = TRUE; + + // reset tracking of who pushed you into a hazard (for kill credit) + other.pushltime = 0; } if(self.enemy.target) @@ -199,9 +205,6 @@ void trigger_push_touch() self = oldself; } - // reset tracking of who pushed you into a hazard (for kill credit) - other.pushltime = 0; - if (other.flags & FL_PROJECTILE) other.angles = vectoangles (other.velocity); -- 2.39.2