]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc
Add a parameter to the PlayerDamaged mutator hook to forbid logging damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / cts / sv_cts.qc
index 458465faaa260587a60563407fa72630d228c21e..00066180ffebad2ab8c4e26f6b4e809933e9c4c0 100644 (file)
@@ -235,6 +235,13 @@ MUTATOR_HOOKFUNCTION(cts, PutClientInServer)
        }
 }
 
+MUTATOR_HOOKFUNCTION(cts, PlayerDamaged)
+{
+       int frag_deathtype = M_ARGV(5, int);
+       if (frag_deathtype == DEATH_KILL.m_id)
+               M_ARGV(0, bool) = true; // forbid_damage_logging
+}
+
 MUTATOR_HOOKFUNCTION(cts, PlayerDies)
 {
        entity frag_target = M_ARGV(2, entity);