From: terencehill Date: Sun, 4 Sep 2016 20:23:57 +0000 (+0200) Subject: CA: Reset .team when a player chooses to spectate; remove ForbidPlayerScore_Clear... X-Git-Tag: xonotic-v0.8.2~620^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d914463adf967d65345d378e422297683b55db21;p=xonotic%2Fxonotic-data.pk3dir.git CA: Reset .team when a player chooses to spectate; remove ForbidPlayerScore_Clear hook call in CA as it serves no purpose (scores aren't clear in team games anyway) --- diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc index 4707e9fca..84f668bab 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -277,25 +277,20 @@ MUTATOR_HOOKFUNCTION(ca, ClientDisconnect) return true; } -MUTATOR_HOOKFUNCTION(ca, ForbidPlayerScore_Clear) -{ - return true; -} - MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver) { entity player = M_ARGV(0, entity); if (!IS_DEAD(player)) ca_LastPlayerForTeam_Notify(player); - if (player.killindicator_teamchange == -2) + if (player.killindicator_teamchange == -2) // player wants to spectate player.caplayer = 0; if (player.caplayer) player.frags = FRAGS_LMS_LOSER; - else - player.frags = FRAGS_SPECTATOR; if (!warmup_stage) eliminatedPlayers.SendFlags |= 1; + if (!player.caplayer) + return false; // allow team reset return true; // prevent team reset }