Vehicle rearm bug
ACE3 Version: latest stable
Mods:
@CBA_A3@ace
Description: https://github.com/acemod/ACE3/blob/master/addons/rearm/functions/fnc_rearmSuccessLocal.sqf#L79
This line removes the last magazine but does not load a new one. This leads to no magazine in the weapon which is indicated by a red zero at the ammo indicator. As there is no way to reload a vehicle weapon manually there is no way to fire with the vehicle again.
Steps to reproduce:
- Spawn HEMMT Ammo
- Spawn Hunter (HMG)
- Mount Hunter as gunner
- exec
(vehicle player) setVehicleAmmo 0 - get ammo from the truck
- rearm the hunter
- mount as gunner again
Where did the issue occur? Multplayer
RPT log file:
- no error shown
As there is no way to reload a vehicle weapon manually there is no way to fire with the vehicle again.
Press R to reload.
@commy2 i can confirm Pressing R dont work
@jonpas @GitHawk
I'll have a look at it, when I get home from work
Looks like setVehicleAmmo breaks magazinesTurret.
I think its removeMagazineTurret and removeMagazinesTurret which breaks magazinesTurret.
Should magazinesTurret list the possible magazines or the current ones?
All of them. Maximum one empty one. Multiple empty mags are discarded when reloading.
If pressing R does not work, then reload via scroll menu. Happens when the new mag is of a different type as the previous one.
I'll be more precise. setVehicleAmmo empties all magazines and removes all but one.
ace_rearm tries to find the last partial magazine of a specific type to fill it. Since in our case (it won't find any) it ran into a dead end.
I'm currently testing code that will fix the problem.
I will also fix the problem of ammo types disappearing when using setVehicleAmmo. If you normally empty a magazine it will stay in the turret even if you switch ammo types.
I'm currently testing code that will fix the problem.
O.K. I'm no expert on the vehicle rearming module, but we'd really appreciate if you could make a PR fixing the issue.
Aye
Should be fixed via #3245