diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index f2b3e38e7..2332e5baa 100644 --- a/src/game/shared/neo/neo_gamerules.cpp +++ b/src/game/shared/neo/neo_gamerules.cpp @@ -171,6 +171,8 @@ ConVar sv_neo_pausematch_enabled("sv_neo_pausematch_enabled", "0", FCVAR_REPLICA ConVar sv_neo_pausematch_unpauseimmediate("sv_neo_pausematch_unpauseimmediate", "0", FCVAR_REPLICATED | FCVAR_CHEAT, "Testing only - If enabled, unpause will be immediate.", true, 0.0f, true, 1.0f); ConVar sv_neo_readyup_countdown("sv_neo_readyup_countdown", "5", FCVAR_REPLICATED, "Set the countdown from fully ready to start of match in seconds.", true, 0.0f, true, 120.0f); ConVar sv_neo_ghost_spawn_bias("sv_neo_ghost_spawn_bias", "0", FCVAR_REPLICATED, "Spawn ghost in the same location as the previous round on odd-indexed rounds (Round 1 = index 0)", true, 0, true, 1); +ConVar sv_neo_ghost_spawn_force("sv_neo_ghost_spawn_force", "-1", FCVAR_REPLICATED | FCVAR_CHEAT, + "Pin the ghost to a fixed neo_ghostspawnpoint every round. -1 uses default random selection.", true, -1, false, 0); ConVar sv_neo_teamdamage_assists("sv_neo_teamdamage_assists", "0", FCVAR_REPLICATED, "Whether to drain XP when assisting the death of a teammate.", true, 0.0f, true, 1.0f); ConVar sv_neo_client_autorecord("sv_neo_client_autorecord", "0", FCVAR_REPLICATED | FCVAR_DONTRECORD, "Record demos clientside", true, 0, true, 1); #ifdef CLIENT_DLL @@ -2054,6 +2056,14 @@ void CNEORules::SpawnTheGhost(const Vector *origin) desiredSpawn = Ceil2Int(roundNumber() / 2.f) % m_ghostSpawns.Count(); } + + if (sv_neo_ghost_spawn_force.GetInt() >= 0) + { + desiredSpawn = sv_neo_ghost_spawn_force.GetInt() % m_ghostSpawns.Count(); + Msg("sv_neo_ghost_spawn_force: pinned ghost spawn %d of %d for this map\n", + desiredSpawn, m_ghostSpawns.Count()); + } + Assert(desiredSpawn >= 0); Assert(desiredSpawn < m_ghostSpawns.Count());