Skip to content
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

Enhancement: Drop loaded ammo when surrender #339

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

AGM-114K
Copy link
Contributor

@AGM-114K AGM-114K commented May 9, 2018

Fix for #243. Surrendering enemy drop magazine/ammo currently loaded to weapon(s).

Ammo currently loaded to weapons are not counted by magazines _unit, and needs to be specifically checked with weaponsItems _unit.
select _x select 4 select 0 returns the classname (select 0) of the magazine (select 4) currently in weapon number _x.

The numbering sequence is main weapon>launcher (if any)>pistol (if any), so that typically the launcher is weapon number 1.

Directly calling weaponsItems _unit select 1 select 4 select 0 when the unit have no secondary weapons seems to return nothing or an error. Calling the function on a unit with no weapons may also cause error.
Further testing and optimization required.

Surrendering enemy drop magazine/ammo currently loaded to weapon(s).
@zalexki zalexki added WIP Work In Progress need testing labels May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need testing WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants