From: Mario Date: Wed, 20 Jun 2018 08:21:08 +0000 (+1000) Subject: Use intrusive lists in a sneaky way to avoid a findchain in spawn point filtering X-Git-Tag: xonotic-v0.8.5~1999 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=719bb0d4bea9c9e6c4b7faa350a140119ca27fa0;p=xonotic%2Fxonotic-data.pk3dir.git Use intrusive lists in a sneaky way to avoid a findchain in spawn point filtering --- diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index a57c9e435..e0e33e480 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -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)