]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_lights.qc
Propagate this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_lights.qc
index 98429f7d7a510fe07a09657825d58809335ec1de..5e9273f7cd43702f62592c461ea8ecabefe9ab66 100644 (file)
@@ -1,5 +1,11 @@
+#include "g_lights.qh"
+
+void train_next();
+
 const float LOOP = 1;
 
+.float speed;
+
 const float DNOSHADOW = 2;
 const float DFOLLOW = 4;
 .float light_lev;
@@ -30,12 +36,13 @@ flags:
 */
 void dynlight_think()
 {
+    SELFPARAM();
        if(!self.owner)
                remove(self);
 
        self.nextthink = time + 0.1;
 }
-void dynlight_find_aiment()
+void dynlight_find_aiment(entity this)
 {
        entity targ;
        if (!self.target)
@@ -51,7 +58,7 @@ void dynlight_find_aiment()
        self.think = dynlight_think;
        self.nextthink = time + 0.1;
 }
-void dynlight_find_path()
+void dynlight_find_path(entity this)
 {
        entity targ;
        if (!self.target)
@@ -63,7 +70,7 @@ void dynlight_find_path()
        self.think = train_next;
        self.nextthink = time + 0.1;
 }
-void dynlight_find_target()
+void dynlight_find_target(entity this)
 {
        entity targ;
        if (!self.target)
@@ -77,15 +84,14 @@ void dynlight_find_target()
 }
 void dynlight_use()
 {
+    SELFPARAM();
        if (self.light_lev == 0)
                self.light_lev = self.lefty;
        else
                self.light_lev = 0;
 }
-void spawnfunc_dynlight()
+spawnfunc(dynlight)
 {
-       local   entity  targ;
-
        if (!self.light_lev)
                self.light_lev = 200;
        if (!self.color)