]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/tturrets/units/unit_checkpoint.qc
Something else was wrong :/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tturrets / units / unit_checkpoint.qc
index 8a581ea39995a28d02fb5a30671317c5bf718d1f..c919601a3352048cfaf256a6d35eb6486fff0d66 100644 (file)
@@ -33,6 +33,15 @@ void turret_checkpoint_use()
 {
 }
 
+#if 0
+void turret_checkpoint_think()
+{
+    if(self.enemy)
+        te_lightning1(self,self.origin, self.enemy.origin);
+
+    self.nextthink = time + 0.25;
+}
+#endif
 /*QUAKED turret_checkpoint (1 0 1) (-32 -32 -32) (32 32 32)
 -----------KEYS------------
 target: .targetname of next waypoint in chain.
@@ -42,24 +51,28 @@ wait:   Pause at this point # seconds.
 If a loop is of targets are formed, any unit entering this loop will patrol it indefinitly.
 If the checkpoint chain in not looped, the unit will go "Roaming" when the last point is reached.
 */
+//float tc_acum;
 void turret_checkpoint_init()
 {
-    traceline(self.origin, self.origin - '0 0 1024', MOVE_WORLDONLY, self);
-    setorigin(self,trace_endpos + '0 0 8');
+    traceline(self.origin + '0 0 16', self.origin - '0 0 1024', MOVE_WORLDONLY, self);
+    setorigin(self, trace_endpos + '0 0 32');
 
     if(self.target != "")
     {
-        self.enemy = find(world,targetname,self.target);
+        self.enemy = find(world, targetname, self.target);
         if(self.enemy == world)
             dprint("A turret_checkpoint faild to find its target!\n");
     }
+    //self.think = turret_checkpoint_think;
+    //self.nextthink = time + tc_acum + 0.25;
+    //tc_acum += 0.25;
 }
 
 void spawnfunc_turret_checkpoint()
 {
     setorigin(self,self.origin);
     self.think = turret_checkpoint_init;
-    self.nextthink = time + 0.1;
+    self.nextthink = time + 0.2;
 }
 
 // Compat.