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)
// 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)