]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Trigger targets before checking the waiting and turning, otherwise they would be...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 22 May 2012 13:57:58 +0000 (16:57 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 22 May 2012 13:57:58 +0000 (16:57 +0300)
qcsrc/server/t_plats.qc

index 81cabfe64c844bc86fa847bb76f7987e373eda7f..e9f52df2c4c282cfdf55f688c37026830f9cb0ab 100644 (file)
@@ -255,6 +255,13 @@ void spawnfunc_func_plat()
 void() train_next;
 void train_wait()
 {
+       entity oldself;
+       oldself = self;
+       self = self.enemy;
+       SUB_UseTargets();
+       self = oldself;
+       self.enemy = world;
+
        // if using bezier curves and turning is enabled, the train will turn toward the next point while waiting
        if(!self.train_wait_turning)
        if(self.spawnflags & 1 && self.bezier_turn && self.wait >= 0)
@@ -279,13 +286,6 @@ void train_wait()
                self.think = train_next;
                self.nextthink = self.ltime + self.wait;
        }
-
-       entity oldself;
-       oldself = self;
-       self = self.enemy;
-       SUB_UseTargets();
-       self = oldself;
-       self.enemy = world;
 }
 
 void train_next()