Page 1 of 1

[not a bug] semi-old mod no longer works...

Posted: Thu Jun 22, 2006 6:14
by wildweasel
An older weapon mod of mine, Batteries Still Not Included (yes, that's a RAR file - don't bother editing it out), has a bit of a major error with the most recent version of GZDoom - namely, in the Heat Rifle weapon on Slot 3. When the heat gauge reaches 100% (whether by cheating for ammo, firing the weapon ten times in a row without letting go of the trigger, or using the alternate fire), it does not decrease like it used to.

Did something change in GZDoom that renders this effect broken? If so, how do I fix my code to comply with the new "standard"?

Posted: Thu Jun 22, 2006 9:06
by Graf Zahl
You are doing an A_JumpIfInventory("Heatlevel", 0, x)

Specifying 0 as an inventory amount means to check for the maximum amount of the item you can carry so once your heat level is at maximum the code doesn't work anymore.

Your mod was working due to a bug in this code that caused any check against 0 to always fail. A_CheckInventory doesn't check for an exact amount so even if 0 was properly implemented it'd jump unconditionally anyway.

Posted: Thu Jun 22, 2006 14:24
by TheDarkArchon
Remember when Zen Dynamics was released and everyone couldn't get reloading to work? It was because of A_JumpIfInventory's using 0 as the amount.