Fix a major and very rare issue, that would cause killtarget-ing a func_bobbing to...
[voretournament/voretournament.git] / data / qcsrc / server / t_plats.qc
index 92f22e92cc9afb16beded860a0a763eb82158583..f207f19d1170e0d6519a9732dd5b8bcb57a14406 100644 (file)
@@ -387,7 +387,8 @@ void func_bobbing_controller_think()
        makevectors((self.nextthink * self.owner.cnt + self.owner.phase * 360) * '0 1 0');\r
        v = self.owner.destvec + self.owner.movedir * v_forward_y;\r
        // * 10 so it will arrive in 0.1 sec\r
-       self.owner.velocity = (v - self.owner.origin) * 10;\r
+       if(self.owner.classname == "func_bobbing")\r
+               self.owner.velocity = (v - self.owner.origin) * 10;\r
 };\r
 \r
 void bobbing_blocked()\r