]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_ca.qc
Prevent a potential crash with vehicles and bloodloss
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_ca.qc
index a0f238358455a271a80a45d996ecf9c07fe16f36..f4c4f6826d34be248dc7e9b49df280161d6e7980 100644 (file)
@@ -1,6 +1,8 @@
-float total_players;
-float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
+#include "gamemode_ca.qh"
+#include "../_all.qh"
+
+#include "gamemode.qh"
+
 float ca_teams;
 float allowed_to_spawn;
 
@@ -351,6 +353,12 @@ MUTATOR_HOOKFUNCTION(ca_PlayerRegen)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(ca_CountFrags)
+{
+       // announce remaining frags
+       return true;
+}
+
 void ca_Initialize()
 {
        allowed_to_spawn = true;
@@ -392,6 +400,7 @@ MUTATOR_DEFINITION(gamemode_ca)
        MUTATOR_HOOK(FilterItem, ca_FilterItem, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, ca_PlayerDamage_SplitHealthArmor, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerRegen, ca_PlayerRegen, CBC_ORDER_ANY);
+       MUTATOR_HOOK(Scores_CountFragsRemaining, ca_CountFrags, CBC_ORDER_ANY);
 
        MUTATOR_ONADD
        {
@@ -402,7 +411,7 @@ MUTATOR_DEFINITION(gamemode_ca)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }