X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fall.qh;h=58840159ef60c60a386dbc5a817b3ad52ae93bc8;hb=9a04df193299873a8133651e4579dbfc2253b717;hp=c79a4e656c4033131542558bd4b49ec9a5a56869;hpb=d1ec6cd7b36e2c16817720fe5cce775fc3d26357;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh index c79a4e656..58840159e 100644 --- a/qcsrc/common/monsters/all.qh +++ b/qcsrc/common/monsters/all.qh @@ -1,11 +1,16 @@ -// TODO: include once -//#ifndef MONSTERS_ALL_H -//#define MONSTERS_ALL_H +#pragma once -#include "monster/zombie.qc" -#include "monster/spider.qc" -#include "monster/mage.qc" -#include "monster/wyvern.qc" -#include "monster/shambler.qc" +string M_Model(string m_mdl); -//#endif +REGISTRY(Monsters, BITS(5)) +#define get_monsterinfo(i) REGISTRY_GET(Monsters, i) +REGISTER_REGISTRY(Monsters) +REGISTRY_CHECK(Monsters) +const int MON_FIRST = 1; +#define MON_LAST (REGISTRY_COUNT(Monsters) - 1) +#define REGISTER_MONSTER(id, inst) REGISTER(Monsters, MON, id, monsterid, inst) + +#include "monster.qh" + +REGISTER_MONSTER(Null, NEW(Monster)); +REGISTRY_DEFINE_GET(Monsters, MON_Null)