team-eternity / eternity

The Eternity Engine
http://eternity.youfailit.net/wiki/Main_Page
GNU General Public License v3.0
230 stars 36 forks source link

(MBF21) Negative A_ConsumeAmmo doesn't work #606

Closed aaaqqqddd closed 9 months ago

aaaqqqddd commented 9 months ago

consumeammo_bug.zip

The MBF21 codepointer A_ConsumeAmmo has incomplete behaviour in Eternity. Per the MBF21 spec, "if amount is negative, ammo will be added to the ammo pool instead." - but in this case, a negative value actually appears to be treated as 0, causing no change in ammo count.

I've enclosed a .wad containing a DeHackEd edit to the pistol (with source) to aid in demonstrating this. It spends no ammo per shot, and calls A_ConsumeAmmo(-2) in the middle of firing.

To reproduce:

Altazimuth commented 9 months ago

Man, I don't remember that being what we agreed on the behaviour being at the time. Must have missed that. I'll fix it.