]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the curve control point a property of the ending path_corner, not the starting one
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 14:29:01 +0000 (17:29 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 May 2012 14:29:01 +0000 (17:29 +0300)
qcsrc/server/t_plats.qc

index 8e7903be0f7479391887a3be2b1f460520691654..ad2f2fa46c6fe18cb35dc2247f86044bb996213f 100644 (file)
@@ -335,11 +335,9 @@ void train_next()
        self.target = targ.target;
        if (self.spawnflags & 1)
        {
-               // FIXME don't do this, instead save the cp for next time to an entity field... we don't do find() for target, kthx?
-               cp = find(world, target, targ.targetname); // get the previous corner first
-               if(cp && cp.curve)
+               if(targ.curve)
                {
-                       cp = find(world, targetname, cp.curve); // now get its second target (the control point)
+                       cp = find(world, targetname, targ.curve); // get its second target (the control point)
                        cp_org = cp.origin - self.mins; // no control point found, assume a straight line to the destination
                }
                else