Skip to content

Commit

Permalink
SERVER: Fix solo games entering Spectator at game end
Browse files Browse the repository at this point in the history
  • Loading branch information
MotoLegacy committed Dec 9, 2024
1 parent 5c7d123 commit 0b820ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions source/server/damage.qc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion source/server/utilities/game_restart.qc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b820ff

Please sign in to comment.