Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/game/server/neo/neo_spawn_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ namespace NeoSpawnManager
return nullptr;
}

if (!rules->IsTeamplay())
{
// Random selection every time for non-teamplay
manager.m_spawns.Shuffle();
}

CNEOSpawnPoint* backup = nullptr;
auto idx = manager.m_spawns.FindPredicate(
[rules, team, player, &backup](const auto& spawn)->bool
Expand Down Expand Up @@ -116,7 +122,11 @@ namespace NeoSpawnManager
return backup;
}

manager.m_spawns[idx].isUsed = true;
if (!rules->CanRespawnAnyTime())
{
// We only care if it's been used before or not if there are no respawns
manager.m_spawns[idx].isUsed = true;
}
return manager.m_spawns[idx].handle;
}

Expand Down
Loading