fix CBA_fnc_selectWeapon, add CBA_fnc_isPerson and CBA_fnc_canUseWeapon #219

Merged
merged 1 commit into from Dec 15, 2015

Projects

None yet

5 participants

@commy2
Contributor
commy2 commented Dec 15, 2015

fixes:

  • CBA_fnc_selectWeapon doesn't work when the unit is in a firing from vehicles slot.
  • CBA_fnc_selectWeapon doesn't work when the local player has not the same weapon as the unit.

adds:

  • CBA_fnc_selectWeapon can now select vehicle weapons.
  • CBA_fnc_selectWeapon has an optional paramter to select a specific weapon mode.
  • CBA_fnc_isPerson which checks if an object is a person (soldier, civilian etc.).
  • CBA_fnc_canUseWeapon which checks if a unit can currently use it's rifle, pistol or launcher. (Basically true on foot and in FFV slots, proved itself very usefull in ACE)
@Killswitch00 Killswitch00 merged commit cfd6723 into CBATeam:master Dec 15, 2015
@SilentSpike

Wouldn't this cause errors if line 36 was false

Member

no its get converted to a typeOf _unit in L36

Contributor

Yes, but only when L36 is true 😄

Contributor

Ah wait, params default value to the rescue! Ignore me, I'm hungover 😄

@Killswitch00

"a weapon mode of specified." ?

@ViperMaul ViperMaul modified the milestone: 2.2.1 Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment