CS# bug bypass for survival mode
All checks were successful
CI / build (push) Successful in 35s
CI / lint (push) Successful in 32s
CI / release (push) Successful in 5m12s

This commit is contained in:
Kamal Tufekcic 2026-07-10 03:01:19 +03:00
commit 8739fd3ac0
6 changed files with 29 additions and 6 deletions

View file

@ -657,7 +657,7 @@ public sealed class SurvivalDriver : IMatchDriver, IDraftDriver
// Respawn a pool bot, then (deferred a frame so the spawn settles) teleport it to a spawn point away from the squad.
private void DirectedBotSpawn(CCSPlayerController bot)
{
bot.Respawn();
bot.SafeRespawn(); // CSSharp's Respawn() faults in SetPawn on a dead controller (see RespawnFix)
if (_spawnPoints.Count == 0 || _p.Config.Survival.MinSpawnDistance <= 0) return; // no candidates / disabled -> plain respawn
int slot = bot.Slot;
OutnumberedPlugin.NextFrameForSlot(slot, b =>
@ -923,7 +923,7 @@ public sealed partial class OutnumberedPlugin
if (p is not { IsValid: true } || p.IsBot || p.PawnIsAlive || p.Team != CsTeam.CounterTerrorist) return;
if (p.AuthorizedSteamID?.SteamId64 is not { } sid) return;
var dest = teleportTo is { } t ? new Vector(t.X, t.Y, t.Z) : null;
p.Respawn();
p.SafeRespawn(); // CSSharp's Respawn() faults in SetPawn on a dead controller (see RespawnFix)
NextFrameForSlot(p.Slot, sid, pl =>
{
var pd = PdOf(pl); var pawn = pl.PlayerPawn.Value;