]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/checkpoint.qc
Give W_SetupShot a deathtype parameter, fixes some ugly hacks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / checkpoint.qc
index a5e758e0eed25b555c751f7c9823d75cc5500538..f5ba71477982d4ec6b727d1312aaf36633269a1c 100644 (file)
@@ -1,3 +1,7 @@
+#include "checkpoint.qh"
+
+#ifdef SVQC
+
 /**
     turret_checkpoint
 **/
 #define checkpoint_cache_to   selected_player
 */
 
-.entity pathgoal;
-
 /*
 entity path_makeorcache(entity forwho,entity start, entity end)
 {
-    entity oldself;
     entity pth;
-    oldself = self;
-    self = forwho;
 
-    //pth = pathlib_makepath(start.origin,end.origin,PFL_GROUNDSNAP,500,1.5,PT_QUICKSTAR);
+    //pth = pathlib_makepath(forwho, start.origin,end.origin,PFL_GROUNDSNAP,500,1.5,PT_QUICKSTAR);
 
-    self = oldself;
     return pth;
 }
 */
@@ -58,9 +56,9 @@ void turret_checkpoint_init(entity this)
 
     if(this.target != "")
     {
-        this.enemy = find(world, targetname, this.target);
-        if(this.enemy == world)
-            LOG_TRACE("A turret_checkpoint faild to find its target!\n");
+        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;
@@ -69,7 +67,7 @@ void turret_checkpoint_init(entity this)
 
 spawnfunc(turret_checkpoint)
 {
-    setorigin(this,this.origin);
+    setorigin(this, this.origin);
     setthink(this, turret_checkpoint_init);
     this.nextthink = time + 0.2;
 }
@@ -80,3 +78,5 @@ spawnfunc(walker_checkpoint)
     this.classname = "turret_checkpoint";
     spawnfunc_turret_checkpoint(this);
 }
+
+#endif