-float LOOP = 1;
+#include "g_lights.qh"
-float DNOSHADOW = 2;
-float DFOLLOW = 4;
+void train_next();
+
+const float LOOP = 1;
+
+.float speed;
+
+const float DNOSHADOW = 2;
+const float DFOLLOW = 4;
.float light_lev;
.float lefty;
.vector color;
*/
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)
self.think = dynlight_think;
self.nextthink = time + 0.1;
}
-void dynlight_find_path()
+void dynlight_find_path(entity this)
{
entity targ;
if (!self.target)
self.think = train_next;
self.nextthink = time + 0.1;
}
-void dynlight_find_target()
+void dynlight_find_target(entity this)
{
entity targ;
if (!self.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)