]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 13eb647dbdeb36d83aeebb371d88a44e4bcef1f4..4b2d366cf59b3c0e361c4edeef1d044006deb396 100644 (file)
@@ -99,6 +99,8 @@ string STR_OBSERVER = "observer";
 #define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
 #define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
 
+#define FOR_EACH_MONSTER(v) for(v = world; (v = findflags(v, flags, FL_MONSTER)) != world; )
+
 #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
 
 // copies a string to a tempstring (so one can strunzone it)
@@ -1000,6 +1002,8 @@ string GetGametype(); // g_world.qc
 void readlevelcvars(void)
 {
        g_minstagib = cvar("g_minstagib");
+    
+       monster_skill = cvar("g_monsters_skill");
 
        // load ALL the mutators
        if(cvar("g_dodging"))