From: Mircea Kitsune Date: Tue, 22 May 2012 13:57:58 +0000 (+0300) Subject: Trigger targets before checking the waiting and turning, otherwise they would be... X-Git-Tag: xonotic-v0.8.0~295^2~40 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0407fefe958e49d505c834f20cf2cb188500d43e;p=xonotic%2Fxonotic-data.pk3dir.git Trigger targets before checking the waiting and turning, otherwise they would be delayed or never trigger at all --- diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 81cabfe64..e9f52df2c 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -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()