]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/monsters/all.qh
Hide the MOTD when going spec
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / all.qh
1 #ifndef MONSTERS_ALL_H
2 #define MONSTERS_ALL_H
3
4 #include "monster.qh"
5
6 REGISTRY(Monsters, BIT(4))
7 REGISTER_REGISTRY(RegisterMonsters)
8 const int MON_FIRST = 1;
9 #define MON_LAST (Monsters_COUNT - 1)
10 /** If you register a new monster, make sure to add it to all.inc */
11 #define REGISTER_MONSTER(id, inst) REGISTER(RegisterMonsters, MON, Monsters, id, monsterid, inst)
12
13 REGISTER_MONSTER(Null, NEW(Monster));
14
15 Monster get_monsterinfo(int id)
16 {
17         if (id >= MON_FIRST && id <= MON_LAST) {
18                 Monster m = Monsters[id];
19                 if (m) return m;
20         }
21         return MON_Null;
22 }
23
24 #include "all.inc"
25
26 #endif