]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/steerlib.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / steerlib.qc
index f986fa2a84f7930b3f732964b4bd8a86aaecd4c9..3418a2c4e375a80c0506dcf58400018c918297fd 100644 (file)
@@ -526,6 +526,8 @@ void spawn_flocker(entity this)
     flocker.health     = 10;
     flocker.pos1      = normalize(flocker.velocity + randomvec() * 0.1);
 
+    IL_PUSH(g_flockers, flocker);
+
     this.cnt = this.cnt -1;
 
 }
@@ -559,7 +561,7 @@ void flocker_hunter_think(entity this)
 
     if(!this.enemy)
     {
-        FOREACH_ENTITY_FLOAT(flock_id, this.flock_id,
+        IL_EACH(g_flockers, it.flock_id == this.flock_id,
         {
             if(it == this.owner || it == ee)
                 continue;
@@ -610,6 +612,9 @@ spawnfunc(flockerspawn)
     this.enemy.nextthink = time + 10;
     this.enemy.flock_id  = this.flock_id;
     this.enemy.owner     = this;
+
+    IL_PUSH(g_flockers, this);
+    IL_PUSH(g_flockers, this.enemy);
 }
 #endif