]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Return true on MakePlayerObserver to not reset team, fixes another gamemode specific...
authorMario <mario@smbclan.net>
Wed, 14 Oct 2015 14:40:16 +0000 (00:40 +1000)
committerMario <mario@smbclan.net>
Wed, 14 Oct 2015 14:40:16 +0000 (00:40 +1000)
qcsrc/server/cl_client.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_freezetag.qc

index 608a05adca6dab7c993d8b68cb147e80c38faaa6..5089b7a12a48d1abd12315f60519d96a7d5b1846 100644 (file)
@@ -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)
index af870ec6c62d29b0540bb73d9c82b68f88f57774..2e380510f151a1452e938c38478cf7b11f1b9f76 100644 (file)
@@ -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)
index 22d51590951a48da47db2f4bf8e1d9651cff34aa..287f507024aa868e9e99e2cd32cf1f43b7be7acb 100644 (file)
@@ -349,7 +349,7 @@ MUTATOR_HOOKFUNCTION(ft, ClientDisconnect)
 MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver)
 {SELFPARAM();
        ft_RemovePlayer();
-       return 1;
+       return false;
 }
 
 MUTATOR_HOOKFUNCTION(ft, PlayerDies)