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) CheckAmmo not working #594

Closed skillsawed closed 1 year ago

skillsawed commented 1 year ago

checkammo_bug.zip

MBF21 codepointer A_CheckAmmo does not behave as it does in other ports - in this case, it fails to switch states when appropriate conditions are met.

The attached wad file contains a custom weapon in the chainsaw slot, which uses cell ammo. The weapon uses A_CheckAmmo to act as if it is in a powered up state if the player has 5 or more cells; otherwise, it should be in an unpowered state. This works as expected in DSDA-Doom (complevel 21) and Woof, but not in Eternity.

I'm speculating but I wonder if this may have something to do with replacing the chainsaw and giving it an ammo type (cells), which may be causing a disconnect somewhere?

To reproduce:

I included the decohack source as an embedded lump if that is helpful.