Vinifera icon indicating copy to clipboard operation
Vinifera copied to clipboard

[Vanilla Bug] Ammo is bugged on infantry, vehicles, and buildings with a weapon

Open Crimsonum opened this issue 1 year ago • 1 comments

First Check

  • [X] I added a very descriptive title to this issue.
  • [X] I used the GitHub search to find a similar issue and didn't find it.
  • [X] I have attached as much information as possible (screenshots, debug and exception logs, etc).

Description

Ammo can be used on any techno type to limit its ammunition. Unfortunately, the ammunition consumption/reload logic is bugged:

  • Infantry reload only after going prone and standing back up. This means that the infantry must receive damage in order to be able to reload. Once the infantry stands back up, it reloads all ammo instantly.
  • Vehicles never reload.
  • Buildings fire all ammunition immediately, ignoring the weapon's ROF. Once all ammo has been depleted, the building will reload instantly, however it will wait for the duration of the weapon's ROF before firing again. This is most likely a leftover from Red Alert (i.e. Tesla Coil) and not a bug per se, but it presents a limitation for modders.

Should these issues be fixed, it should also be relevant to allow modders to override the hardcoded default reload rate. In addition, technos should probably be able to reload while idling and still having some ammo left, instead of having to deplete all ammunition first before the reload mechanism kicks in.

Required Code (optional)

In vanilla TS, the only non-aircraft unit with limited ammo is the Technician. To make reproducing the issue easier, I've modified several basic units and buildings to have limited ammo in the attached test map.

Steps To Reproduce

  1. Download the attached test map
  2. Place it in your TS folder
  3. Start the TS GDI campaign
  4. Shoot around with the units and buildings

Expected Behaviour

Units/defenses should reload after depleting their ammunition.

Actual Behaviour

Most reload mechanisms are bugged or broken/missing altogether.

Additional Context

https://github.com/Vinifera-Developers/Vinifera/assets/17765965/f8e5443d-bacc-4dce-93a7-2c1cd02a12c8

Download test map

Crimsonum avatar Sep 27 '23 12:09 Crimsonum