]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clan Arena: display the "You are now alone!" message only when needed
authorterencehill <piuntn@gmail.com>
Tue, 2 Oct 2018 18:56:45 +0000 (20:56 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 2 Oct 2018 18:56:45 +0000 (20:56 +0200)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc

index 9cd378f0fe6eacd521fe22e6f0bf3c5557b00ce5..2bbed4a9abb78f5cb8fd73ecbdf5d9a9a68474f7 100644 (file)
@@ -298,7 +298,7 @@ MUTATOR_HOOKFUNCTION(ca, ClientDisconnect)
 {
        entity player = M_ARGV(0, entity);
 
-       if (player.caplayer == 1)
+       if (IS_PLAYER(player) && !IS_DEAD(player))
                ca_LastPlayerForTeam_Notify(player);
        return true;
 }
@@ -307,7 +307,7 @@ MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
 {
        entity player = M_ARGV(0, entity);
 
-       if (!IS_DEAD(player))
+       if (IS_PLAYER(player) && !IS_DEAD(player))
                ca_LastPlayerForTeam_Notify(player);
        if (player.killindicator_teamchange == -2) // player wants to spectate
                player.caplayer = 0;