ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Vehicle rearm bug

Open netfusion opened this issue 10 years ago • 11 comments

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

netfusion avatar Feb 01 '16 03:02 netfusion

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 avatar Feb 01 '16 05:02 commy2

@commy2 i can confirm Pressing R dont work

jokoho48 avatar Feb 01 '16 12:02 jokoho48

@jonpas @GitHawk

jokoho48 avatar Feb 01 '16 12:02 jokoho48

I'll have a look at it, when I get home from work

GitHawk avatar Feb 01 '16 12:02 GitHawk

Looks like setVehicleAmmo breaks magazinesTurret.

GitHawk avatar Feb 01 '16 16:02 GitHawk

I think its removeMagazineTurret and removeMagazinesTurret which breaks magazinesTurret.

Should magazinesTurret list the possible magazines or the current ones?

netfusion avatar Feb 01 '16 16:02 netfusion

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.

commy2 avatar Feb 01 '16 17:02 commy2

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.

GitHawk avatar Feb 01 '16 17:02 GitHawk

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.

commy2 avatar Feb 01 '16 18:02 commy2

Aye

GitHawk avatar Feb 01 '16 18:02 GitHawk

Should be fixed via #3245

PabstMirror avatar Feb 20 '16 16:02 PabstMirror