X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fall.qc;h=9dc09ca394b47166bc4d717901d0aa17f6465664;hb=b9ed1a38cd897084d0ed8beb6033a761e095d64d;hp=37dbcb325867662132853feb7f890b4915d01cb9;hpb=cf4d36d9d295ce940e9e9bdf7a711e4036de0b3c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/all.qc b/qcsrc/common/monsters/all.qc index 37dbcb325..9dc09ca39 100644 --- a/qcsrc/common/monsters/all.qc +++ b/qcsrc/common/monsters/all.qc @@ -1,47 +1,12 @@ #include "all.qh" -#include "all.inc" - -// MONSTER PLUGIN SYSTEM -entity monster_info[MON_MAXCOUNT]; -entity dummy_monster_info; - -void register_monster(int id, float(float) func, int monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname) -{ - entity e; - monster_info[id - 1] = e = spawn(); - e.classname = "monster_info"; - e.monsterid = id; - e.netname = shortname; - e.monster_name = mname; - e.monster_func = func; - e.mdl = modelname; - e.spawnflags = monsterflags; - e.mins = min_s; - e.maxs = max_s; - e.model = strzone(strcat("models/monsters/", modelname)); -} -float m_null(float dummy) { return 0; } -void register_monsters_done() -{ - dummy_monster_info = spawn(); - dummy_monster_info.classname = "monster_info"; - dummy_monster_info.monsterid = 0; // you can recognize dummies by this - dummy_monster_info.netname = ""; - dummy_monster_info.monster_name = "Monster"; - dummy_monster_info.monster_func = m_null; - dummy_monster_info.mdl = ""; - dummy_monster_info.mins = '-0 -0 -0'; - dummy_monster_info.maxs = '0 0 0'; - dummy_monster_info.model = ""; -} -entity get_monsterinfo(int id) +string M_Model(string m_mdl) { - entity m; - if(id < MON_FIRST || id > MON_LAST) - return dummy_monster_info; - m = monster_info[id - 1]; - if(m) - return m; - return dummy_monster_info; + string output = strcat("models/monsters/", m_mdl); +#ifdef SVQC + MUTATOR_CALLHOOK(MonsterModel, m_mdl, output); + return M_ARGV(1, string); +#else + return output; +#endif }