From 10327506dd0078a693b97d62654e6d5fc86df441 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 19 Aug 2015 09:47:19 +1000 Subject: [PATCH] Add IS_MACRO macro for matthiaskrgr --- qcsrc/server/miscfunctions.qh | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 2.39.2