]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
Fix up more mutator hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / onslaught / onslaught.qc
index d7a615b87a2095554e7805c9455009a069f3666c..fad837f403e27e99abbd740b8961c6f1a2da87c5 100644 (file)
@@ -1972,9 +1972,9 @@ MUTATOR_HOOKFUNCTION(ons, MonsterSpawn)
 
 void ons_TurretSpawn_Delayed(entity this)
 {
-       entity own = self.owner;
+       entity own = this.owner;
 
-       if(!own) { remove(self); return; }
+       if(!own) { remove(this); return; }
 
        if(own.targetname)
        {
@@ -1988,13 +1988,15 @@ void ons_TurretSpawn_Delayed(entity this)
                }
        }
 
-       remove(self);
+       remove(this);
 }
 
 MUTATOR_HOOKFUNCTION(ons, TurretSpawn)
-{SELFPARAM();
+{
+       entity turret = M_ARGV(0, entity);
+
        entity e = spawn();
-       e.owner = self;
+       e.owner = turret;
        InitializeEntity(e, ons_TurretSpawn_Delayed, INITPRIO_FINDTARGET);
 
        return false;