acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
1.01k stars 736 forks source link

Unable to Rearm Vehicle With 'Entire Vehicle' #6129

Closed aristenn closed 1 year ago

aristenn commented 6 years ago

Arma 3 Version: 1.80.143869 (stable) CBA Version: 3.6.1.180131 (stable) ACE3 Version: 3.12.1 (stable)

Mods:

- CBA_A3
- ace

Description: When attempting to rearm a vehicle with the Rearm setting set to "Entire Vehicle' the progress bar pops up and disappears almost instantly. When returning to the vehicle, the rounds have not been rearmed.

https://youtu.be/5WDUmltgdkA

Steps to reproduce:

Where did the issue occur?

Placed Modules:

RPT log file:

dedmen commented 6 years ago

Sounds like #5944 but no script error and that one has already been fixed. Only thing I can imagine is https://github.com/acemod/ACE3/blob/2ed9eaca2f65ed4773a3df80fab99f065a137c05/addons/rearm/functions/fnc_rearmEntireVehicle.sqf#L31 Maybe a hint should be displayed when it aborts because out of reach?

aristenn commented 6 years ago

The issue seems to happen regardless of how far the vehicle is from the rearm vehicle (Within ranges that the ACE action appears).

Furthermore, if the vehicle is out of reach, why am I getting the ACE action to perform the rearm?

Bosenator commented 6 years ago

I am also getting this error on a third party vehicle with a third party rearm truck on a dedicated server. Same symptoms.

senevoldsen commented 6 years ago

I think I have something on this one - but I might have made a mistake.

Let Truck be the ammo truck, Vehicle the vehicle we are trying to rearm, and player is obvious. Instead of REARM_ACTION_DISTANCE I will just write 9.

Then in https://github.com/acemod/ACE3/blob/f35f80ee828adb4c9dbbcd8f285f9a9a0cb02d59/addons/rearm/functions/fnc_initSupplyVehicle.sqf#L44 the actions are only added if canTakeAmmo is true. That is only true if the (player distance Truck) < 9.

The target vehicle shown in the list is then added in addRearmActions. A Vehicle is only considered at all if (Vehicle distance Truck) < 20 in https://github.com/acemod/ACE3/blob/0644ad9ca2fadd28711dd614be296542a834bc3e/addons/rearm/functions/fnc_addRearmActions.sqf#L20

As @dedmen writes earlier, in order for the loading to proceed we must have during the entire loading time that (player distance Vehicle) < 9.

That leaves the are where the Player is close to the Truck (<9m), and the Truck is within 20m of the Vehicle, but the player is away from the Vehicle (>9m). This also coincides with my personal experience that you need to get close to the vehicle you wish to rearm to avoid the progress bar disappearing immediately.

stale[bot] commented 5 years ago

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.

dedmen commented 5 years ago

Needs to be labeled as bug to make the bot not close it.

Mike-MF commented 1 year ago

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.