diff --git a/addons/infantry/CfgVehicles.hpp b/addons/infantry/CfgVehicles.hpp index 7d674185..c370c40e 100644 --- a/addons/infantry/CfgVehicles.hpp +++ b/addons/infantry/CfgVehicles.hpp @@ -34,8 +34,7 @@ class CfgVehicles { uniformClass = "rhs_uniform_cu_ocp_1stcav"; - weapons[] = {"rhs_weap_m4a1_carryhandle","Throw","Put"}; - respawnWeapons[] = {"rhs_weap_m4a1_carryhandle","Throw","Put"}; + MACRO_SPAWN_WEAPON(rhs_weap_m4a1_carryhandle); magazines[] = { MULT_OBJ_12(rhs_mag_30Rnd_556x45_M855A1_Stanag) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index d7804550..4d46e6fa 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -81,6 +81,11 @@ item = ##BARREL; \ } +#define MACRO_SPAWN_WEAPON(WEAPON) \ + weapons[] = { QUOTE(WEAPON), QUOTE(Throw), QUOTE(Put) }; \ + respawnWeapons[] = { QUOTE(WEAPON), QUOTE(Throw), QUOTE(Put) } + + #define MULT_OBJ_0(a) #define MULT_OBJ_1(a) QUOTE(a) #define MULT_OBJ_2(a) MULT_OBJ_1(a), QUOTE(a)