2 #include "../../dpdefs/csprogsdefs.qh"
3 #include "../weapons/weapons.qh"
7 #include "../../dpdefs/progsdefs.qh"
8 #include "../../dpdefs/dpextensions.qh"
9 #include "../../warpzonelib/server.qh"
10 #include "../constants.qh"
12 #include "monsters.qh"
13 #include "sv_monsters.qh"
14 #include "../weapons/weapons.qh"
15 #include "../../server/t_items.qh"
16 #include "../../server/autocvars.qh"
17 #include "../../server/constants.qh"
18 #include "../../server/defs.qh"
19 #include "../deathtypes.qh"
20 #include "../../server/mutators/mutators_include.qh"
21 #include "../../csqcmodellib/sv_model.qh"
25 // MONSTER PLUGIN SYSTEM
26 entity monster_info[MON_MAXCOUNT];
27 entity dummy_monster_info;
29 void register_monster(int id, float(float) func, int monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname)
32 monster_info[id - 1] = e = spawn();
33 e.classname = "monster_info";
35 e.netname = shortname;
36 e.monster_name = mname;
37 e.monster_func = func;
39 e.spawnflags = monsterflags;
42 e.model = strzone(strcat("models/monsters/", modelname));
44 float m_null(float dummy) { return 0; }
45 void register_monsters_done()
47 dummy_monster_info = spawn();
48 dummy_monster_info.classname = "monster_info";
49 dummy_monster_info.monsterid = 0; // you can recognize dummies by this
50 dummy_monster_info.netname = "";
51 dummy_monster_info.monster_name = "Monster";
52 dummy_monster_info.monster_func = m_null;
53 dummy_monster_info.mdl = "";
54 dummy_monster_info.mins = '-0 -0 -0';
55 dummy_monster_info.maxs = '0 0 0';
56 dummy_monster_info.model = "";
58 entity get_monsterinfo(int id)
61 if(id < MON_FIRST || id > MON_LAST)
62 return dummy_monster_info;
63 m = monster_info[id - 1];
66 return dummy_monster_info;