]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/all.qh
Registry: hide arrays
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / all.qh
index f32470b58467b1613c3a0cff82bd765c5496ab91..5e46e8a80b56e6c3c6c93259a3a4126b0f6acafa 100644 (file)
@@ -6,6 +6,8 @@
 string M_Model(string m_mdl);
 
 REGISTRY(Monsters, BITS(5))
+#define Monsters_from(i) _Monsters_from(i, MON_Null)
+#define get_monsterinfo(i) Monsters_from(i)
 REGISTER_REGISTRY(RegisterMonsters)
 const int MON_FIRST = 1;
 #define MON_LAST (Monsters_COUNT - 1)
@@ -14,14 +16,6 @@ const int MON_FIRST = 1;
 
 REGISTER_MONSTER(Null, NEW(Monster));
 
-Monster get_monsterinfo(int id)
-{
-       if (id >= MON_FIRST && id <= MON_LAST) {
-               Monster m = Monsters[id];
-               if (m) return m;
-       }
-       return MON_Null;
-}
 
 #include "all.inc"