- firstspot = Spawn_FilterOutBadSpots(this, firstspot, 100, teamcheck);
+ firstspot = Spawn_FilterOutBadSpots(this, firstspot, 100, teamcheck, true);
+
+ // emergency fallback! double check without targets
+ // fixes some crashes with improperly repacked maps
+ if(!firstspot)
+ {
+ firstspot = IL_FIRST(g_spawnpoints);
+ prev = NULL;
+ IL_EACH(g_spawnpoints, true,
+ {
+ if(prev)
+ prev.chain = it;
+ it.chain = NULL;
+ prev = it;
+ });
+ firstspot = Spawn_FilterOutBadSpots(this, firstspot, 100, teamcheck, false);
+ }