X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fdeathtypes%2Fall.qh;h=0466c230ab3b709f40343ce3d2bba3c2c3442894;hb=34e7f534e2015466228eb3a78c9857741b736dca;hp=14304992a2273200878117c54c2eab2397cd80f6;hpb=7f5ad47610dc8b5580cc96ae961a57cca96e6975;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/deathtypes/all.qh b/qcsrc/common/deathtypes/all.qh index 14304992a..0466c230a 100644 --- a/qcsrc/common/deathtypes/all.qh +++ b/qcsrc/common/deathtypes/all.qh @@ -1,7 +1,6 @@ -#ifndef DEATHTYPES_ALL_H -#define DEATHTYPES_ALL_H +#pragma once -#include "../notifications.qh" +#include REGISTRY(Deathtypes, BITS(8)) #define Deathtypes_from(i) _Deathtypes_from(i, NULL) @@ -15,13 +14,12 @@ REGISTRY_CHECK(Deathtypes) int dt_identity(int i) { return i; } #define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) \ - REGISTER(Deathtypes, DEATH, id, m_id, new(deathtype)) { \ - make_pure(this); \ + REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) { \ this.m_id += DT_FIRST; \ this.nent_name = #id; \ this.death_msgextra = extra; \ - if (msg_death != NO_MSG) this.death_msgself = msg_multi_notifs[dt_identity(msg_death - 1)]; \ - if (msg_death_by != NO_MSG) this.death_msgmurder = msg_multi_notifs[dt_identity(msg_death_by - 1)]; \ + this.death_msgself = msg_death; \ + this.death_msgmurder = msg_death_by; \ } const int DEATH_WEAPONMASK = BITS(8); @@ -48,5 +46,3 @@ const int DT_FIRST = BIT(13); string Deathtype_Name(int deathtype); #include "all.inc" - -#endif