]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon.qh
Remove client side macro for conditional weapon spawn functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon.qh
index 02fbdb536c283c669714f2ac754df048f3bacd9f..2d176c04e639d66cd630668513006483f174f754 100644 (file)
@@ -129,6 +129,13 @@ void weapon_defaultspawnfunc(entity this, Weapon e);
 #define SPAWNFUNC_WEAPON(name, weapon) \
     spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
 
+#define SPAWNFUNC_WEAPON_COND(name, cond, wep1, wep2) \
+    spawnfunc(name) \
+    { \
+        entity wep = (cond) ? wep1 : wep2; \
+        weapon_defaultspawnfunc(this, wep); \
+    }
+
 #else
 
 #define SPAWNFUNC_WEAPON(name, weapon)