From 0b820ff6be4dd48de234252f4618490e90efbc4c Mon Sep 17 00:00:00 2001 From: MotoLegacy Date: Sun, 8 Dec 2024 22:02:19 -0800 Subject: [PATCH] SERVER: Fix solo games entering Spectator at game end --- source/server/damage.qc | 6 ++---- source/server/utilities/game_restart.qc | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source/server/damage.qc b/source/server/damage.qc index 885f407..9fea476 100644 --- a/source/server/damage.qc +++ b/source/server/damage.qc @@ -70,8 +70,6 @@ void() EndGame = local entity who; self.health = 0; - self.origin = '0 0 0'; - setorigin (self, self.origin); self.velocity = '0 0 0'; oldself = self; @@ -114,7 +112,8 @@ void() startspectate = self.downed = 0; self.frame = 0; - SpectatorSpawn(); + if (player_count > 1) + SpectatorSpawn(); } // searches for players that are alive given which clients have which playernumbers @@ -146,7 +145,6 @@ void() EndGameSetup = self.weapon2model = ""; self.animend = SUB_Null; self.perks = 0; - self.is_spectator = true; self.movetype = MOVETYPE_TOSS; if (!game_over) { diff --git a/source/server/utilities/game_restart.qc b/source/server/utilities/game_restart.qc index 8ae26a4..7508fb3 100644 --- a/source/server/utilities/game_restart.qc +++ b/source/server/utilities/game_restart.qc @@ -368,7 +368,6 @@ void() Soft_Restart = { self.pri_grenade_state = 0; InitRounds(); - self.is_spectator = true; PutClientInServer(); nzp_screenflash(world, SCREENFLASH_COLOR_BLACK, 1, SCREENFLASH_FADE_OUT);