From 3aaf6744c244dbd7dc20257bf090ae20c1616c7e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 15 Oct 2015 00:40:16 +1000 Subject: [PATCH] Return true on MakePlayerObserver to not reset team, fixes another gamemode specific check --- qcsrc/server/cl_client.qc | 4 ++-- qcsrc/server/mutators/gamemode_ca.qc | 2 +- qcsrc/server/mutators/gamemode_freezetag.qc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 608a05adc..5089b7a12 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -208,7 +208,7 @@ void PutObserverInServer (void) self.frags = FRAGS_SPECTATOR; self.bot_attack = false; - MUTATOR_CALLHOOK(MakePlayerObserver); + bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver); Portal_ClearAll(self); @@ -226,7 +226,7 @@ void PutObserverInServer (void) WaypointSprite_PlayerDead(); - if (!g_ca) // don't reset teams when moving a ca player to the spectators + if(!mutator_returnvalue) // mutator prevents resetting teams self.team = -1; // move this as it is needed to log the player spectating in eventlog if(self.killcount != -666) diff --git a/qcsrc/server/mutators/gamemode_ca.qc b/qcsrc/server/mutators/gamemode_ca.qc index af870ec6c..2e380510f 100644 --- a/qcsrc/server/mutators/gamemode_ca.qc +++ b/qcsrc/server/mutators/gamemode_ca.qc @@ -317,7 +317,7 @@ MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver) self.frags = FRAGS_LMS_LOSER; if(!warmup_stage) eliminatedPlayers.SendFlags |= 1; - return 1; + return true; } MUTATOR_HOOKFUNCTION(ca, ForbidThrowCurrentWeapon) diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 22d515909..287f50702 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -349,7 +349,7 @@ MUTATOR_HOOKFUNCTION(ft, ClientDisconnect) MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver) {SELFPARAM(); ft_RemovePlayer(); - return 1; + return false; } MUTATOR_HOOKFUNCTION(ft, PlayerDies) -- 2.39.2