Fix compilation with gmqcc.
authorRudolf Polzer <divverent@xonotic.org>
Fri, 11 Oct 2013 14:54:39 +0000 (16:54 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 11 Oct 2013 14:54:39 +0000 (16:54 +0200)
qcsrc/server/g_subs.qc
qcsrc/server/t_plats.qc

index 96ccc26..cc6f369 100644 (file)
@@ -188,6 +188,7 @@ void SUB_CalcMove_controller_think (void)
                        self.owner.angles_z -= 360 * floor((self.owner.angles_z - destangle_z) / 360 + 0.5);
                        angloc = destangle - self.owner.angles;
                        angloc = angloc * (1 / sys_frametime); // so it arrives for the next frame
                        self.owner.angles_z -= 360 * floor((self.owner.angles_z - destangle_z) / 360 + 0.5);
                        angloc = destangle - self.owner.angles;
                        angloc = angloc * (1 / sys_frametime); // so it arrives for the next frame
+                       self.owner.avelocity = angloc;
                }
                if(nexttick < self.animstate_endtime)
                        veloc = nextpos - self.owner.origin;
                }
                if(nexttick < self.animstate_endtime)
                        veloc = nextpos - self.owner.origin;
@@ -196,7 +197,6 @@ void SUB_CalcMove_controller_think (void)
                veloc = veloc * (1 / sys_frametime); // so it arrives for the next frame
 
                self.owner.velocity = veloc;
                veloc = veloc * (1 / sys_frametime); // so it arrives for the next frame
 
                self.owner.velocity = veloc;
-               self.owner.avelocity = angloc;
                self.nextthink = nexttick;
        } else {
                // derivative: delta + 2 * delta2 (e.g. for angle positioning)
                self.nextthink = nexttick;
        } else {
                // derivative: delta + 2 * delta2 (e.g. for angle positioning)
index 9ca98af..97ae43e 100644 (file)
@@ -336,8 +336,8 @@ void train_wait()
 
 void train_next()
 {
 
 void train_next()
 {
-       entity targ, cp;
-       vector cp_org;
+       entity targ, cp = world;
+       vector cp_org = '0 0 0';
 
        targ = find(world, targetname, self.target);
        self.target = targ.target;
 
        targ = find(world, targetname, self.target);
        self.target = targ.target;
@@ -348,8 +348,6 @@ void train_next()
                        cp = find(world, targetname, targ.curvetarget); // get its second target (the control point)
                        cp_org = cp.origin - self.view_ofs; // no control point found, assume a straight line to the destination
                }
                        cp = find(world, targetname, targ.curvetarget); // get its second target (the control point)
                        cp_org = cp.origin - self.view_ofs; // no control point found, assume a straight line to the destination
                }
-               else
-                       cp = world; // no cp
        }
        if (self.target == "")
                objerror("train_next: no next target");
        }
        if (self.target == "")
                objerror("train_next: no next target");