X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=42d12e951ff36a92a4c47900485dade5f5221dfb;hp=91e922869ba4a69ca0117416853870b8ccbd4749;hb=410ff5f6cc4f7d5d8282ba9d93fe6a65d1c74489;hpb=39c6fe854bc866de4089c9a48a7db488296285db diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 91e922869..42d12e951 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -99,6 +99,8 @@ const 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)