]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/checkpoint.qc
take3: format 903 files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / checkpoint.qc
index f5ba71477982d4ec6b727d1312aaf36633269a1c..9083b6b2cd7df6002b9f3f00a4dfc3d52d0ed508 100644 (file)
@@ -7,7 +7,7 @@
 **/
 
 
-//.entity checkpoint_target;
+// .entity checkpoint_target;
 
 /*
 #define checkpoint_cache_who  flagcarried
@@ -27,16 +27,16 @@ entity path_makeorcache(entity forwho,entity start, entity end)
 */
 
 void turret_checkpoint_use()
-{
-}
+{}
 
 #if 0
 void turret_checkpoint_think(entity this)
 {
-    if(this.enemy)
-        te_lightning1(this,this.origin, this.enemy.origin);
+       if (this.enemy) {
+               te_lightning1(this, this.origin, this.enemy.origin);
+       }
 
-    this.nextthink = time + 0.25;
+       this.nextthink = time + 0.25;
 }
 #endif
 /*QUAKED turret_checkpoint (1 0 1) (-32 -32 -32) (32 32 32)
@@ -48,35 +48,35 @@ 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;
+// float tc_acum;
 void turret_checkpoint_init(entity this)
 {
-    traceline(this.origin + '0 0 16', this.origin - '0 0 1024', MOVE_WORLDONLY, this);
-    setorigin(this, trace_endpos + '0 0 32');
+       traceline(this.origin + '0 0 16', this.origin - '0 0 1024', MOVE_WORLDONLY, this);
+       setorigin(this, trace_endpos + '0 0 32');
 
-    if(this.target != "")
-    {
-        this.enemy = find(NULL, targetname, this.target);
-        if(this.enemy == NULL)
-            LOG_TRACE("A turret_checkpoint faild to find its target!");
-    }
-    //setthink(this, turret_checkpoint_think);
-    //this.nextthink = time + tc_acum + 0.25;
-    //tc_acum += 0.25;
+       if (this.target != "") {
+               this.enemy = find(NULL, targetname, this.target);
+               if (this.enemy == NULL) {
+                       LOG_TRACE("A turret_checkpoint faild to find its target!");
+               }
+       }
+       // setthink(this, turret_checkpoint_think);
+       // this.nextthink = time + tc_acum + 0.25;
+       // tc_acum += 0.25;
 }
 
 spawnfunc(turret_checkpoint)
 {
-    setorigin(this, this.origin);
-    setthink(this, turret_checkpoint_init);
-    this.nextthink = time + 0.2;
+       setorigin(this, this.origin);
+       setthink(this, turret_checkpoint_init);
+       this.nextthink = time + 0.2;
 }
 
 // Compat.
 spawnfunc(walker_checkpoint)
 {
-    this.classname = "turret_checkpoint";
-    spawnfunc_turret_checkpoint(this);
+       this.classname = "turret_checkpoint";
+       spawnfunc_turret_checkpoint(this);
 }
 
 #endif