]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/viewloc.qc
s/world/NULL/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / viewloc.qc
index 9e4ab50682da3f8f9b35730fdc0dd479d376279c..9d675bbc734dbba6ad08ea4a549b005297b779cc 100644 (file)
@@ -17,8 +17,8 @@ void viewloc_think(entity this)
        // we abuse this method, rather than using normal .touch, because touch isn't reliable with multiple clients inside the same trigger, and can't "untouch" entities
 
        // set myself as current viewloc where possible
-       for(e = world; (e = findentity(e, viewloc, this)); )
-               e.viewloc = world;
+       for(e = NULL; (e = findentity(e, viewloc, this)); )
+               e.viewloc = NULL;
 
                for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain)
                        if(!e.viewloc)
@@ -58,13 +58,13 @@ bool trigger_viewloc_send(entity this, entity to, int sf)
 void viewloc_init(entity this)
 {
        entity e;
-       for(e = world; (e = find(e, targetname, this.target)); )
+       for(e = NULL; (e = find(e, targetname, this.target)); )
                if(e.classname == "target_viewlocation_start")
                {
                        this.enemy = e;
                        break;
                }
-       for(e = world; (e = find(e, targetname, this.target2)); )
+       for(e = NULL; (e = find(e, targetname, this.target2)); )
                if(e.classname == "target_viewlocation_end")
                {
                        this.goalentity = e;
@@ -136,8 +136,8 @@ spawnfunc(target_viewlocation) { spawnfunc_target_viewlocation_start(this); }
 
 void trigger_viewloc_updatelink(entity this)
 {
-       this.enemy = findfloat(world, entnum, this.cnt);
-       this.goalentity = findfloat(world, entnum, this.count);
+       this.enemy = findfloat(NULL, entnum, this.cnt);
+       this.goalentity = findfloat(NULL, entnum, this.count);
 }
 
 NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
@@ -145,8 +145,8 @@ NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
        float point1 = ReadShort();
        float point2 = ReadShort();
 
-       this.enemy = findfloat(world, entnum, point1);
-       this.goalentity = findfloat(world, entnum, point2);
+       this.enemy = findfloat(NULL, entnum, point1);
+       this.goalentity = findfloat(NULL, entnum, point2);
 
        this.origin_x = ReadCoord();
        this.origin_y = ReadCoord();