Skip to content

Commit 3655262

Browse files
authored
Fix DM spawns finale special edition (#1974)
1 parent 5fcd565 commit 3655262

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/game/server/neo/neo_spawn_manager.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ namespace NeoSpawnManager
7373
return nullptr;
7474
}
7575

76+
if (!rules->IsTeamplay())
77+
{
78+
// Random selection every time for non-teamplay
79+
manager.m_spawns.Shuffle();
80+
}
81+
7682
CNEOSpawnPoint* backup = nullptr;
7783
auto idx = manager.m_spawns.FindPredicate(
7884
[rules, team, player, &backup](const auto& spawn)->bool
@@ -116,7 +122,11 @@ namespace NeoSpawnManager
116122
return backup;
117123
}
118124

119-
manager.m_spawns[idx].isUsed = true;
125+
if (!rules->CanRespawnAnyTime())
126+
{
127+
// We only care if it's been used before or not if there are no respawns
128+
manager.m_spawns[idx].isUsed = true;
129+
}
120130
return manager.m_spawns[idx].handle;
121131
}
122132

0 commit comments

Comments
 (0)