]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monsters.qc
For convenience, provide bezier curve functions globally.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monsters.qc
index 91ae416a4a68bd3894b6aab588d84bc7f2f40c08..70802dbbde3fafe4c90fe41002b255a206ca9be2 100644 (file)
@@ -1,16 +1,10 @@
-#ifdef SVQC
-#include "lib/defs.qh"
-#include "lib/monsters.qc"
-#include "lib/spawn.qc"
-#endif
-
 #include "all.qh"
 
 // MONSTER PLUGIN SYSTEM
 entity monster_info[MON_MAXCOUNT];
 entity dummy_monster_info;
 
-void register_monster(float id, float(float) func, vector min_s, vector max_s, string modelname, string shortname, string mname)
+void register_monster(float id, float(float) func, float monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname)
 {
        entity e;
        monster_info[id - 1] = e = spawn();
@@ -20,11 +14,14 @@ void register_monster(float id, float(float) func, vector min_s, vector max_s, s
        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));
-       
-       func(MR_INIT);
+
+       #ifndef MENUQC
+       func(MR_PRECACHE);
+       #endif
 }
 float m_null(float dummy) { return 0; }
 void register_monsters_done()
@@ -49,4 +46,4 @@ entity get_monsterinfo(float id)
        if(m)
                return m;
        return dummy_monster_info;
-}
+}
\ No newline at end of file