]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc
Style: expand LAMBDA()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / spawn_near_teammate / sv_spawn_near_teammate.qc
index ee75728630e2e5623f988e1d7efaf7b31d9f37d7..55bc12392d8e4704a2c52705361d06b102301c06 100644 (file)
@@ -33,7 +33,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
                return;
 
        RandomSelection_Init();
-       FOREACH_CLIENT(IS_PLAYER(it) && it != player && SAME_TEAM(it, player) && !IS_DEAD(it), LAMBDA(
+       FOREACH_CLIENT(IS_PLAYER(it) && it != player && SAME_TEAM(it, player) && !IS_DEAD(it), {
                if(vdist(spawn_spot.origin - it.origin, >, autocvar_g_spawn_near_teammate_distance))
                        continue;
                if(vdist(spawn_spot.origin - it.origin, <, 48))
@@ -41,7 +41,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
                if(!checkpvs(spawn_spot.origin, it))
                        continue;
                RandomSelection_AddEnt(it, 1, 1);
-       ));
+       });
 
        if(RandomSelection_chosen_ent)
        {
@@ -85,7 +85,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
                vector best_pos = '0 0 0';
                float best_dist2 = FLOAT_MAX;
                int tested = 0;
-               FOREACH_CLIENT_RANDOM(IS_PLAYER(it), LAMBDA(
+               FOREACH_CLIENT_RANDOM(IS_PLAYER(it), {
                        if (autocvar_g_spawn_near_teammate_ignore_spawnpoint_max && tested >= autocvar_g_spawn_near_teammate_ignore_spawnpoint_max) break;
 
                        if (PHYS_INPUT_BUTTON_CHAT(it)) continue;
@@ -196,7 +196,7 @@ LABEL(skip)
                                        break; // don't test the other spots near this teammate, go to the next one
                                }
                        }
-               ));
+               });
 
                if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath)
                if(best_mate)