From: Mario Date: Tue, 18 Aug 2015 23:47:19 +0000 (+1000) Subject: Add IS_MACRO macro for matthiaskrgr X-Git-Tag: xonotic-v0.8.2~2064^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=10327506dd0078a693b97d62654e6d5fc86df441;p=xonotic%2Fxonotic-data.pk3dir.git Add IS_MACRO macro for matthiaskrgr --- diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index a3c0d78d3..c30068722 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -162,6 +162,13 @@ const string STR_OBSERVER = "observer"; #define IS_VEHICLE(v) (v.vehicle_flags & VHF_ISVEHICLE) #define IS_TURRET(v) (v.turrcaps_flags & TFL_TURRCAPS_ISTURRET) +#define IS_MACRO(v) \ + #ifdef v \ + true \ + #else \ + false \ + #endif + #define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); ) #define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v)) #define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))