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

Rearm bug #6579

Closed
ramblasos opened this issue Sep 17, 2018 · 3 comments
Closed

Rearm bug #6579

ramblasos opened this issue Sep 17, 2018 · 3 comments
Labels
Milestone

Comments

@ramblasos
Copy link

Arma 3 Version: 1.84 (stable)
CBA Version: 3.8.8 (stable)
ACE3 Version: 3.12.3 (stable)

Mods:

- CBA_A3
- ace

Description:
Certain attack helicopters with dynamic loadout where you can assign a pylon to a turret, like Mi-48 Kajman or AH-99 Blackfoot, cannot be rearmed correctly (in rearm mode Amount based on caliber).

If a pylon is empty before rearm then the assignment of a pylon will be reset to default after rearm.

Seems like the issue is in the function ace_common fnc_getPylonTurret

Line 36:
private _inPilot = _targetMag in (_vehicle magazinesTurret [-1]);

Command magazinesTurret does not return empty magazines when ammo is depleted in a pylon that was assigned to a pilot. It will return default turret, which is usually a gunner turret ([0]).

As a possible fix we can use another function in line 36:
private _inPilot = _targetMag in (((magazinesAllTurrets _vehicle) select {(_x#1) isEqualTo [-1]}) apply {_x#0});

`-----------------------------------------------------
Full ammo in pylon:
private _inPilot = _targetMag in (_vehicle magazinesTurret [-1]);
Result: _inPilot -> True

private _inPilot = _targetMag in (((magazinesAllTurrets _vehicle) select {(_x#1) isEqualTo [-1]}) apply {_x#0});
Result: _inPilot -> True


Empty ammo in pylon:
private _inPilot = _targetMag in (_vehicle magazinesTurret [-1]);
Result: _inPilot -> False

private _inPilot = _targetMag in (((magazinesAllTurrets _vehicle) select {(_x#1) isEqualTo [-1]}) apply {_x#0});
Result: _inPilot -> True
-----------------------------------------------------`

Steps to reproduce:

  • Rearm mode Amount based on caliber. Place a Kajman and an Tempest Ammo in editor. Change default assignment of turrets to pilot (instead of gunner). Preview, get to pilot seat, fire to deplete ammo. Try to rearm. After rearm pylons get assigned to default (gunner).

Where did the issue occur?

  • Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal

Placed Modules:

  • None.
@stale
Copy link

stale bot commented Mar 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale label Mar 16, 2019
@PabstMirror PabstMirror added this to the Ongoing milestone Mar 16, 2019
@stale stale bot removed the status/stale label Mar 16, 2019
@jonpas jonpas added the kind/bug label Apr 6, 2020
@Mike-MF
Copy link
Member

Mike-MF commented Sep 19, 2023

Closing due to age, inactivity or already solved. May be re-opened if the issue is still present, even better just open a new up-to-date Issue.

@Mike-MF Mike-MF closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@LinkIsGrim LinkIsGrim modified the milestones: Ongoing, 3.13.6 Sep 27, 2023
@LinkIsGrim LinkIsGrim reopened this Sep 27, 2023
@LinkIsGrim
Copy link
Contributor

Closed in #8087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants