Merge branch 'master' into Mario/cts_respawn_clear
authorMario <mario@smbclan.net>
Tue, 4 Apr 2017 21:22:54 +0000 (07:22 +1000)
committerMario <mario@smbclan.net>
Tue, 4 Apr 2017 21:22:54 +0000 (07:22 +1000)
qcsrc/server/client.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/player.qc

index 168ca84968c5e6fc75422b18fc777880874b3c12..aad1629fcb2af38b9d9b71b7ebd4ba2ffc2679df 100644 (file)
@@ -907,7 +907,7 @@ void KillIndicator_Think(entity this)
                ClientKill_Now(this.owner);
                return;
        }
-    else if(g_cts && this.health == 1) // health == 1 means that it's silent
+    else if(this.health == 1) // health == 1 means that it's silent
     {
         this.nextthink = time + 1;
         this.cnt -= 1;
@@ -937,11 +937,9 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
 
        killtime = autocvar_g_balance_kill_delay;
 
-       if(g_race_qualifying || g_cts)
-               killtime = 0;
-
     if(MUTATOR_CALLHOOK(ClientKill, this, killtime))
        return;
+    killtime = M_ARGV(1, float);
 
        this.killindicator_teamchange = targetteam;
 
index c41586c0464d141bcdfb90c1840277688af2a52a..c4c8f087e495d388dfc360ca3cc895724894b771 100644 (file)
@@ -102,6 +102,12 @@ float WinningCondition_QualifyingThenRace(float limit)
        return wc;
 }
 
+MUTATOR_HOOKFUNCTION(rc, ClientKill)
+{
+       if(g_race_qualifying)
+               M_ARGV(1, float) = 0; // killtime
+}
+
 MUTATOR_HOOKFUNCTION(rc, AbortSpeedrun)
 {
        entity player = M_ARGV(0, entity);
index 9458f1dc065d2ca0fb99685b042a5ea716c5890e..8598bc095e76871416d0b535c7667185e09ad080 100644 (file)
@@ -253,7 +253,7 @@ void calculate_player_respawn_time(entity this)
                ));
                if (sdelay_small_count == 0)
                {
-                       if (g_cts)
+                       if (IS_INDEPENDENT_PLAYER(this))
                        {
                                // Players play independently. No point in requiring enemies.
                                sdelay_small_count = 1;
@@ -266,7 +266,7 @@ void calculate_player_respawn_time(entity this)
                }
                if (sdelay_large_count == 0)
                {
-                       if (g_cts)
+                       if (IS_INDEPENDENT_PLAYER(this))
                        {
                                // Players play independently. No point in requiring enemies.
                                sdelay_large_count = 1;