]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/all.qh
Add level saving for admins, and include 2 levels to progress through
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / all.qh
index 72861f9d236eea06b46e4a44879e5598f42f5fd3..b771984f212b1b4ef3a680099e19e7059600662e 100644 (file)
@@ -3,23 +3,20 @@
 
 #include "monster.qh"
 
-REGISTRY(Monsters, BITS(4))
-REGISTER_REGISTRY(RegisterMonsters)
+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(Monsters)
+REGISTRY_CHECK(Monsters)
 const int MON_FIRST = 1;
 #define MON_LAST (Monsters_COUNT - 1)
 /** If you register a new monster, make sure to add it to all.inc */
-#define REGISTER_MONSTER(id, inst) REGISTER(RegisterMonsters, MON, Monsters, id, monsterid, inst)
+#define REGISTER_MONSTER(id, inst) REGISTER(Monsters, MON, id, monsterid, inst)
 
 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"