X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fspawnpoints.qc;h=03b40c5e12864aa7570c19ff0169c0ec107162b2;hb=45d8904a100765555e622598a39967963733df1d;hp=a57c9e4350d587afd19e232848d167f6b68b8840;hpb=3068527d9b5e3d425c0aa6262b2b20c54b8eb69a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index a57c9e435..03b40c5e1 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -248,7 +248,7 @@ 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 != "") + if(spot.target && spot.target != "") { int found = 0; for(entity targ = findchain(targetname, spot.target); targ; targ = targ.chain) @@ -372,7 +372,16 @@ entity SelectSpawnPoint(entity this, bool anypoint) // get the entire list of spots - entity firstspot = findchain(classname, "info_player_deathmatch"); + //entity firstspot = findchain(classname, "info_player_deathmatch"); + entity firstspot = IL_FIRST(g_spawnpoints); + entity prev = NULL; + IL_EACH(g_spawnpoints, true, + { + if(prev) + prev.chain = it; + it.chain = NULL; + prev = it; + }); // filter out the bad ones // (note this returns the original list if none survived) if(anypoint)