Cannon HUD reload indicator shows reload progressing even when all ammo expended

Issue #267 resolved
Matt Hands created an issue

Fire off all cannon ammo. Ammo reload indicator then shows the usual red coloured 4 stage reload progress. But there's no round to fire, so it's misleading. Bug is in 5.1; nothing recent.

Comments (1)

  1. Matt Hands reporter

    Fixed in commit 8cc7d1a.

    Also reduced frequency of repeating timer (if reload can't progress as no commander present or no ammo) from 0.05 to 0.5 seconds. We really don't need a timer called 20 times a second on the server and every client, just in case a new player has entered the turret or the tank has driven over a resupply !

    Using a repeating timer isn't actually necessary for this functionality and is pretty inefficient. I'd like to replace it with a system where reloads are actively paused/resumed, triggered by player entering/exiting, moving to/from valid loading DriverPositions, or entering resupply zone. Have done it before with MG reloads on modded vehicles and it works fine. But something for another time and certainly after 6.0. See, I am learning !! :)

  2. Log in to comment