]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_lights.qc
Bots: define the API boundaries
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_lights.qc
index 849ba535836e39522cd0dfa500d0c56b4b77a341..425716d2da7cb92dc3001d2383947b7a4eab86dd 100644 (file)
@@ -37,7 +37,7 @@ flags:
 void dynlight_think(entity this)
 {
        if(!this.owner)
-               remove(this);
+               delete(this);
 
        this.nextthink = time + 0.1;
 }
@@ -47,8 +47,8 @@ void dynlight_find_aiment(entity this)
        if (!this.target)
                objerror (this, "dynlight: no target to follow");
 
-       targ = find(world, targetname, this.target);
-       this.movetype = MOVETYPE_FOLLOW;
+       targ = find(NULL, targetname, this.target);
+       set_movetype(this, MOVETYPE_FOLLOW);
        this.aiment = targ;
        this.owner = targ;
        this.punchangle = targ.angles;
@@ -63,7 +63,7 @@ void dynlight_find_path(entity this)
        if (!this.target)
                objerror (this, "dynlight: no target to follow");
 
-       targ = find(world, targetname, this.target);
+       targ = find(NULL, targetname, this.target);
        this.target = targ.target;
        setorigin(this, targ.origin);
        setthink(this, train_next);
@@ -75,7 +75,7 @@ void dynlight_find_target(entity this)
        if (!this.target)
                objerror (this, "dynlight: no target to follow");
 
-       targ = find(world, targetname, this.target);
+       targ = find(NULL, targetname, this.target);
        setattachment(this, targ, this.dtagname);
        this.owner = targ;
        setthink(this, dynlight_think);
@@ -123,7 +123,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);