From: Mario Date: Wed, 14 Oct 2015 14:40:16 +0000 (+1000) Subject: Return true on MakePlayerObserver to not reset team, fixes another gamemode specific... X-Git-Tag: xonotic-v0.8.2~1801^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3aaf6744c244dbd7dc20257bf090ae20c1616c7e;p=xonotic%2Fxonotic-data.pk3dir.git Return true on MakePlayerObserver to not reset team, fixes another gamemode specific check --- 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)