]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add IS_MACRO macro for matthiaskrgr
authorMario <zacjardine@y7mail.com>
Tue, 18 Aug 2015 23:47:19 +0000 (09:47 +1000)
committerMario <zacjardine@y7mail.com>
Tue, 18 Aug 2015 23:47:19 +0000 (09:47 +1000)
qcsrc/server/miscfunctions.qh

index a3c0d78d30310933631c53ca00809c51ddaff94a..c30068722aea8f4f852e047771c61ec4e46f6cf2 100644 (file)
@@ -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))