Created a separate trigger that fires when the effect that creates (launches) the stinger missile is executed rather than when the weapon is used. (This is the same as version 1 except that the event here fires when the stinger missile launch effect is executed rather than when the missile unit is created.)
This is a deterministic approach that spends ammo only in the event that a missile is launched.
This also fixes a bug that has been around for a long time, where if your targeting action was interrupted before the missile was fired you lose the 10 rounds without the missile being fired -- essentially causing 10 rounds to magically vanish.
The 0.3 and 0.7-second waits for the missile to launch was removed since ammo is now processed at missile launch.
TEST NOTES:
I tested this on several runs, trying to break the game as much as I could. No errors, no glitches, all seems to work out perfectly, but I'm not able to publish a version on my own that can be tested with multiple players.
I recommend publishing a test map ("Unstable?") to be tested with multiple players before merging to the official version of NOTD but this is not absolutely required. ~ ThunderRazor
PATCH NOTES: Optimized stinger ammo usage.
DETAILS:
TEST NOTES: