Skip to content

Commit

Permalink
Added test macro for respanw and spawn weapon
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Aug 25, 2023
1 parent 78dbb64 commit beed7ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions addons/infantry/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit beed7ee

Please sign in to comment.