]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Replace `MAP(IDENTITY)` with `UNWORDS`
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 13 May 2015 23:32:50 +0000 (09:32 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 13 May 2015 23:32:50 +0000 (09:32 +1000)
qcsrc/common/items/item/ammo.qc
qcsrc/common/items/item/armor.qc
qcsrc/common/items/item/health.qc
qcsrc/common/items/item/jetpack.qc
qcsrc/common/items/item/powerup.qc
qcsrc/common/util-pre.qh
qcsrc/server/mutators/mutator_instagib.qc

index 23f8d8aae5a36660426ba54b7721b9f02a99bb6b..032fcc3feaaca2c43187d1815d0691f92241c12a 100644 (file)
@@ -11,7 +11,7 @@
         ,   respawntime         =       GET(g_pickup_respawntime_ammo)  \
         ,   respawntimejitter   = GET(g_pickup_respawntimejitter_ammo)  \
         )                                                               \
-        MAP(IDENTITY, __VA_ARGS__)                                      \
+        UNWORDS(__VA_ARGS__)                                            \
     ))
 
 DEFINE(Bullets
index 4a3c9c022076de186edcf6b3781ff9d7006e3f52..8fed098ac190f5b7229fb94a1961f8368ddd852b 100644 (file)
@@ -5,7 +5,7 @@
 
 #define WITH(it) this.m_##it;
 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id, ...) REGISTER_ITEM(id, Armor, MAP(IDENTITY, __VA_ARGS__))
+#define DEFINE(id, ...) REGISTER_ITEM(id, Armor, UNWORDS(__VA_ARGS__))
 
 DEFINE(ArmorSmall
     ,APPLY(CONFIGURE
index 304bfd4a292209e8698d072fb17617a674200cb4..08b422de1efdfddcaef9badd716264813774bca5 100644 (file)
@@ -5,7 +5,7 @@
 
 #define WITH(it) this.m_##it;
 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id, ...) REGISTER_ITEM(id, Health, MAP(IDENTITY, __VA_ARGS__))
+#define DEFINE(id, ...) REGISTER_ITEM(id, Health, UNWORDS(__VA_ARGS__))
 
 DEFINE(HealthSmall
     ,APPLY(CONFIGURE
index 963f63dfa0a685aab0c6cbeee7cb425a2957335f..9ff4ed05cbcd344a30433c27a4b562a8717b16a5 100644 (file)
@@ -5,7 +5,7 @@
 
 #define WITH(it) this.m_##it;
 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id, ...) REGISTER_ITEM(id, Pickup, MAP(IDENTITY, __VA_ARGS__))
+#define DEFINE(id, ...) REGISTER_ITEM(id, Pickup, UNWORDS(__VA_ARGS__))
 
 DEFINE(Jetpack
     ,APPLY(CONFIGURE
index ca54fa73f8c8254f9732c2ddd9f3897a812f0cff..f10a97e54ff8770b2660ecad293f5cc70d0a67b0 100644 (file)
@@ -11,7 +11,7 @@
         ,   respawntime         =         GET(g_pickup_respawntime_powerup) \
         ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup) \
         )                                                                   \
-        MAP(IDENTITY, __VA_ARGS__)                                          \
+        UNWORDS(__VA_ARGS__)                                          \
     ))
 
 DEFINE(Strength
index 8fe729e7f0dafdda415e8a1e9fdec5ffebfbc5da..9d60ae0a9ae2797bfdaedea9632237e81554f564 100644 (file)
@@ -83,6 +83,8 @@
 
 #define IDENTITY(it) it
 
+#define UNWORDS(...) MAP(IDENTITY, __VA_ARGS__)
+
 #define APPLY(f, ...) f(__VA_ARGS__)
 
 #ifdef SVQC
index d24a4688b1e7160104cc2cb69ad3129b0fa094b8..161dba90deb0c68d22f65ee5e65b96d4cf87de33 100644 (file)
@@ -15,7 +15,7 @@ float instagib_respawntimejitter_ammo = 0;
 GETTER(float, instagib_respawntime_ammo)
 GETTER(float, instagib_respawntimejitter_ammo)
 
-REGISTER_ITEM(VaporizerCells, Pickup, MAP(IDENTITY
+REGISTER_ITEM(VaporizerCells, Pickup, APPLY(UNWORDS
     ,APPLY(CONFIGURE
     ,   model               =   "models/items/a_cells.md3"
     ,   sound               =   "misc/itempickup.wav"
@@ -29,7 +29,7 @@ REGISTER_ITEM(VaporizerCells, Pickup, MAP(IDENTITY
     )
 ))
 
-REGISTER_ITEM(ExtraLife, Pickup, MAP(IDENTITY
+REGISTER_ITEM(ExtraLife, Pickup, APPLY(UNWORDS
     ,APPLY(CONFIGURE
     ,   model               =   "models/items/g_h100.md3"
     ,   sound               =   "misc/megahealth.wav"