New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CBA_fnc_selectWeapon, add CBA_fnc_isPerson and CBA_fnc_canUseWeapon #219

Merged
merged 1 commit into from Dec 15, 2015

Conversation

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 added a commit that referenced this pull request Dec 15, 2015

Merge pull request #219 from commy2/fixselectweapon
fix CBA_fnc_selectWeapon, add CBA_fnc_isPerson and CBA_fnc_canUseWeapon

@Killswitch00 Killswitch00 merged commit cfd6723 into CBATeam:master Dec 15, 2015

@SilentSpike

This comment has been minimized.

Show comment
Hide comment
@SilentSpike

SilentSpike Dec 18, 2015

Contributor

Wouldn't this cause errors if line 36 was false

Wouldn't this cause errors if line 36 was false

This comment has been minimized.

Show comment
Hide comment
@jokoho48

jokoho48 Dec 18, 2015

Member

no its get converted to a typeOf _unit in L36

Member

jokoho48 replied Dec 18, 2015

no its get converted to a typeOf _unit in L36

This comment has been minimized.

Show comment
Hide comment
@SilentSpike

SilentSpike Dec 18, 2015

Contributor

Yes, but only when L36 is true 😄

Contributor

SilentSpike replied Dec 18, 2015

Yes, but only when L36 is true 😄

This comment has been minimized.

Show comment
Hide comment
@SilentSpike

SilentSpike Dec 18, 2015

Contributor

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

Contributor

SilentSpike replied Dec 18, 2015

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

@Killswitch00

This comment has been minimized.

Show comment
Hide comment
@Killswitch00

Killswitch00 Dec 18, 2015

Contributor

"a weapon mode of specified." ?

"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