]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monsters.qc
Some minor monster improvements (antilag, precaching on spawn rather than on world...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monsters.qc
index 706bf552651e97cf71286f1162c78ffe830c0406..67e176cf26395b6001ca42c7090fbade0bf5040d 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, float monstertype, 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,12 +14,10 @@ void register_monster(float id, float(float) func, float monstertype, vector min
        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));
-       e.spawnflags = monstertype;
-       
-       func(MR_INIT);
 }
 float m_null(float dummy) { return 0; }
 void register_monsters_done()
@@ -40,7 +32,6 @@ void register_monsters_done()
        dummy_monster_info.mins = '-0 -0 -0';
        dummy_monster_info.maxs = '0 0 0';
        dummy_monster_info.model = "";
-       dummy_monster_info.spawnflags = 0;
 }
 entity get_monsterinfo(float id)
 {