]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/deathtypes/all.qc
Merge branch 'master' into matthiaskrgr/screenshotcmd
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / deathtypes / all.qc
diff --git a/qcsrc/common/deathtypes/all.qc b/qcsrc/common/deathtypes/all.qc
new file mode 100644 (file)
index 0000000..823a20f
--- /dev/null
@@ -0,0 +1,11 @@
+#include "all.qh"
+
+string Deathtype_Name(int deathtype)
+{
+       if (DEATH_ISSPECIAL(deathtype)) {
+               entity deathent = Deathtypes_from(deathtype - DT_FIRST);
+               if (!deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; }
+               return deathent.nent_name;
+       }
+       return ftos(deathtype);
+}