]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/deathtypes.qh
Rename the minigame definition functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / deathtypes.qh
index e5e87c65f2fe07a97ba5ce42f1536b8398a8bfa3..301d665769c3f908ec708753078436b7946049eb 100644 (file)
@@ -1,7 +1,21 @@
+#ifndef DEATHTYPES_H
+#define DEATHTYPES_H
+
+#include "notifications.qh"
+
 // ================================
 //  Deathtypes, reworked by Samual
 // ================================
 
+int DEATH_SPECIAL_START;
+int NORMAL_POS;
+int DEATH_MONSTER_FIRST;
+int DEATH_MONSTER_LAST;
+int DEATH_TURRET_FIRST;
+int DEATH_TURRET_LAST;
+int DEATH_VHFIRST;
+int DEATH_VHLAST;
+
 #define DEATHTYPES \
        DEATHTYPE(DEATH_AUTOTEAMCHANGE,         DEATH_SELF_AUTOTEAMCHANGE,          NO_MSG,                        DEATH_SPECIAL_START) \
        DEATHTYPE(DEATH_BUFF_VENGEANCE,         NO_MSG,                             DEATH_MURDER_VENGEANCE,        NORMAL_POS) \
@@ -75,7 +89,6 @@ entity deathtypes[DT_MAX];
 
 #define DEATHTYPE(name,msg_death,msg_death_by,position) \
        int name; \
-       int position; \
        void RegisterDeathtype_##name() \
        { \
                SET_FIRST_OR_LAST(position, DT_FIRST, DT_COUNT) \
@@ -105,7 +118,7 @@ DEATHTYPES
 #define DEATH_WEAPONOF(t)             (DEATH_ISSPECIAL(t) ? 0 : DEATH_WEAPONOFWEAPONDEATH(t))
 #define WEP_VALID(w)                  ((w) >= WEP_FIRST && (w) <= WEP_LAST)
 
-string Deathtype_Name(float deathtype)
+string Deathtype_Name(int deathtype)
 {
        if(DEATH_ISSPECIAL(deathtype))
        {
@@ -123,3 +136,4 @@ const int HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage
 const int HITTYPE_BOUNCE = 0x400;
 const int HITTYPE_RESERVED2 = 0x800;
 const int HITTYPE_RESERVED = 0x1000; // unused yet
+#endif