]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/spiderbot.qc
Fix warpzones
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / spiderbot.qc
index 63924987e22917ede4c2de0e72a48d292df9b839..8015b3102729534d836ce32fc4d111e59f6ea8c1 100644 (file)
@@ -337,19 +337,14 @@ bool spiderbot_frame(entity this)
 
 void spiderbot_exit(entity this, int eject)
 {
-       entity e;
        vector spot;
 
-       e = findchain(classname,"spiderbot_rocket");
-       while(e)
+       FOREACH_ENTITY_ENT(owner, this.owner,
        {
-               if(e.owner == this.owner)
-               {
-                       e.realowner = this.owner;
-                       e.owner = world;
-               }
-               e = e.chain;
-       }
+               if(it.classname != "spiderbot_rocket") continue;
+               it.realowner = this.owner;
+               it.owner = NULL;
+       });
 
        setthink(this, vehicles_think);
        this.nextthink = time;
@@ -389,7 +384,7 @@ void spiderbot_exit(entity this, int eject)
        }
 
        antilag_clear(this.owner, CS(this.owner));
-       this.owner = world;
+       this.owner = NULL;
 }
 
 void spiderbot_headfade(entity this)
@@ -475,7 +470,7 @@ void spiderbot_blowup(entity this)
        SUB_SetFade(g1, time, min(this.respawntime, 10));
        SUB_SetFade(g2, time, min(this.respawntime, 10));
 
-       RadiusDamage (this, this.enemy, 250, 15, 250, world, world, 250, DEATH_VH_SPID_DEATH.m_id, world);
+       RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_SPID_DEATH.m_id, NULL);
 
        this.alpha = this.tur_head.alpha = this.gun1.alpha = this.gun2.alpha = -1;
        this.movetype = MOVETYPE_NONE;