From 545c9d157c19417473cc5bcf3ed15bd96ce1a574 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 7 Aug 2011 17:41:21 +0200 Subject: [PATCH] fix jumppad endpos finding --- qcsrc/server/t_jumppads.qc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 5302a9292..e1e92d129 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -261,12 +261,14 @@ void trigger_push_findtarget() for(e = world; (e = find(e, targetname, self.target)); ) { ++n; - - trigger_push_calculatevelocity(org, self.enemy, self.height); - flighttime = trigger_push_calculatevelocity_flighttime; - + e = spawn(); + setorigin(e, org); + setsize(e, PL_MIN, PL_MAX); + e.velocity = trigger_push_calculatevelocity(org, self.enemy, self.height); + tracetoss(e, e); if(e.movetype == MOVETYPE_NONE) - waypoint_spawnforteleporter(self, e.origin, flighttime); + waypoint_spawnforteleporter(self, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity)); + remove(e); } if(n == 0) @@ -293,9 +295,8 @@ void trigger_push_findtarget() setsize(e, PL_MIN, PL_MAX); e.velocity = self.movedir; tracetoss(e, e); - self.dest = trace_endpos; + waypoint_spawnforteleporter(self, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity)); remove(e); - waypoint_spawnforteleporter(self, self.dest, vlen(self.dest - org) / vlen(self.movedir)); } }; -- 2.39.2