]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_lights.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_lights.qc
index 41366f5ea2a5f1c9a84d9e386774740a774f261e..852f1efc01d70cda4a73a3d903a67c20a67e1601 100644 (file)
@@ -1,5 +1,8 @@
 #include "g_lights.qh"
 
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
+
 void train_next(entity this);
 
 const float LOOP = 1;
@@ -37,7 +40,7 @@ flags:
 void dynlight_think(entity this)
 {
        if(!this.owner)
-               remove(this);
+               delete(this);
 
        this.nextthink = time + 0.1;
 }
@@ -48,7 +51,7 @@ void dynlight_find_aiment(entity this)
                objerror (this, "dynlight: no target to follow");
 
        targ = find(NULL, targetname, this.target);
-       this.movetype = MOVETYPE_FOLLOW;
+       set_movetype(this, MOVETYPE_FOLLOW);
        this.aiment = targ;
        this.owner = targ;
        this.punchangle = targ.angles;
@@ -123,7 +126,7 @@ spawnfunc(dynlight)
        if (this.target)
 //     if (!(this.spawnflags & DFOLLOW))
        {
-               this.movetype = MOVETYPE_NOCLIP;
+               set_movetype(this, MOVETYPE_NOCLIP);
                if (!this.speed)
                        this.speed = 100;
                InitializeEntity(this, dynlight_find_path, INITPRIO_FINDTARGET);