]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a warning when spawning in CTS
authorMario <mario@smbclan.net>
Fri, 24 Jun 2016 06:38:44 +0000 (16:38 +1000)
committerMario <mario@smbclan.net>
Fri, 24 Jun 2016 06:38:44 +0000 (16:38 +1000)
qcsrc/server/spawnpoints.qc

index 21112d93f3e55f1063723dcdc463b5b4c4f265b5..4be19b879d317ac5976bbe87f3c70cd7f1870e93 100644 (file)
@@ -252,16 +252,16 @@ vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck)
        if(spot.target != "")
        {
                int found = 0;
-               FOREACH_ENTITY_STRING(targetname, spot.target,
+               for(entity targ = findchain(targetname, spot.target); targ; targ = targ.chain)
                {
                        ++found;
-                       if(it.spawn_evalfunc)
+                       if(targ.spawn_evalfunc)
                        {
-                               spawn_score = it.spawn_evalfunc(it, this, spot, spawn_score);
+                               spawn_score = targ.spawn_evalfunc(targ, this, spot, spawn_score);
                                if(spawn_score.x < 0)
                                        return spawn_score;
                        }
-               });
+               }
 
                if(!found)
                {