From 719bb0d4bea9c9e6c4b7faa350a140119ca27fa0 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 Jun 2018 18:21:08 +1000 Subject: [PATCH] Use intrusive lists in a sneaky way to avoid a findchain in spawn point filtering --- qcsrc/server/spawnpoints.qc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) -- 2.39.2