]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix jumppads again
authorRudolf Polzer <divverent@xonotic.org>
Sun, 7 Aug 2011 15:48:31 +0000 (17:48 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 7 Aug 2011 15:48:31 +0000 (17:48 +0200)
qcsrc/server/t_jumppads.qc

index e1e92d129c7c6ef4dd874cac29df47613999da8e..888b94456ff6496223698d7a2bce47054f7276d6 100644 (file)
@@ -246,7 +246,7 @@ void trigger_push_touch()
 .vector dest;
 void trigger_push_findtarget()
 {
-       local entity e;
+       local entity e, t;
        local vector org;
        local float flighttime;
 
@@ -258,13 +258,13 @@ void trigger_push_findtarget()
        {
                float n;
                n = 0;
-               for(e = world; (e = find(e, targetname, self.target)); )
+               for(t = world; (t = find(t, targetname, self.target)); )
                {
                        ++n;
                        e = spawn();
                        setorigin(e, org);
                        setsize(e, PL_MIN, PL_MAX);
-                       e.velocity = trigger_push_calculatevelocity(org, self.enemy, self.height);
+                       e.velocity = trigger_push_calculatevelocity(org, t, self.height);
                        tracetoss(e, e);
                        if(e.movetype == MOVETYPE_NONE)
                                waypoint_spawnforteleporter(self, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));