]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/deathtypes.qh
Merge branch 'master' into Mario/rifle_arena
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / deathtypes.qh
index f5fe4287c7a480be5faf018a8993003e9eb01b8f..ee3f8bdd12d178cf6494c0cf0db613712f86f07f 100644 (file)
@@ -70,7 +70,7 @@ entity deathtypes[DT_MAX];
                CHECK_MAX_COUNT(name, DT_MAX, DT_COUNT, "deathtypes") \
                \
                entity deathent = spawn(); \
-               deathtypes[(name - DT_FIRST) - 1] = deathent; \
+               deathtypes[(name - DT_FIRST)] = deathent; \
                deathent.classname = "deathtype"; \
                deathent.nent_name = #name; \
                #if (msg_death != NO_MSG) \
@@ -97,7 +97,7 @@ string Deathtype_Name(float deathtype)
 {
        if(DEATH_ISSPECIAL(deathtype))
        {
-               entity deathent = deathtypes[(deathtype - DT_FIRST) - 1];
+               entity deathent = deathtypes[(deathtype - DT_FIRST)];
                if not(deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; }
                return deathent.nent_name;
        }