]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
Add a mutator hook to append special item codes to the death log
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / ctf / sv_ctf.qc
index 2484240a26d1c83c62b9487bdcf85ff7d984b6ff..939c70e29ea858597260439a21ea3db98c19f78c 100644 (file)
@@ -2593,6 +2593,13 @@ MUTATOR_HOOKFUNCTION(ctf, DropSpecialItems)
                ctf_Handle_Throw(frag_target, NULL, DROP_THROW);
 }
 
+MUTATOR_HOOKFUNCTION(ctf, LogDeath_AppendItemCodes)
+{
+       entity player = M_ARGV(0, entity);
+       if(player.flagcarried)
+               M_ARGV(1, string) = strcat(M_ARGV(1, string), "F"); // item codes
+}
+
 
 // ==========
 // Spawnfuncs