]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/spawnpoints.qc
A couple of tweaks (don't do fall damage tests if player entity isn't moving, don...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / spawnpoints.qc
index f55fb1122aee7e5686b4ee83aa43324da388633c..21112d93f3e55f1063723dcdc463b5b4c4f265b5 100644 (file)
@@ -249,21 +249,19 @@ vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck)
        vector spawn_score = prio * '1 0 0' + shortest * '0 1 0';
 
        // filter out spots for assault
-       if(spot.target != "") {
-               entity ent;
-               float found;
-
-               found = 0;
-               for(ent = NULL; (ent = find(ent, targetname, spot.target)); )
+       if(spot.target != "")
+       {
+               int found = 0;
+               FOREACH_ENTITY_STRING(targetname, spot.target,
                {
                        ++found;
-                       if(ent.spawn_evalfunc)
+                       if(it.spawn_evalfunc)
                        {
-                               spawn_score = ent.spawn_evalfunc(ent, this, spot, spawn_score);
+                               spawn_score = it.spawn_evalfunc(it, this, spot, spawn_score);
                                if(spawn_score.x < 0)
                                        return spawn_score;
                        }
-               }
+               });
 
                if(!found)
                {