Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
t.v.

Weird bug with unlimited ammo in PrBoom

Recommended Posts

I am making a PrBoom compatible version of Harmony.

Now I ran into a strange bug involving the altered weapons behaviour.
PrBoom seems to be reading the dehacked differently than I expected.

In Harmony the pistol is replaced with a futuristic energy gun with unlimited ammo. But when I fire it in PrBoom, something strange happens:

Every shot from the new pistol takes 1 shell out of the maximum amount of shells (shotgun is still weapon #3).
I start out with 0 / 24 shells (meaning I have no shells but if I find any I can hold 24 max). When I fire my pistol once I can only hold 23 shells. When I reach below 0, I get a big red "minus" symbol on the status bar and I cannot select any other weapon anymore (except for weaopon #0, which is unable to fire).

PrBoom, should read dehacked the same as other ports right?
So... can anyone help me figure out what is going on and how to fix it? All I want is to have the pistol to fire energy bolts with unlimited ammo (as it does in the zdoom version).

I made a wad with the dehacked coding in it, so you can see it for yourselves:
rabotik.nl/temp/weapons-bug-01.wad
(please ignore the bad coloring: Harmony uses a different palette than Doom).

I am using PrBoom-Plus 2.5.1.3 BTW

thanks in advance.

Share this post


Link to post

Looking at code......

OK, all of the weapon codepointers beginning with A_Fire (A_FireMissile etc) will decrease the ammo for the weapon, without any check for the "noammo" value. So it ends up decreasing the wrong value (in this case the ammo maximum value for shells).

There is no way to fix this without using some other mechanism to spawn the missile.

Or entryway could consider this a bug and fix it.

Share this post


Link to post

ahh, that is not the answer I was hoping for, but thanks!

You wouldn't know an easy way to spawn a missle would you? ... :-/


Anyway: I have sent a PM to Entryway about it.

In the meantime I will look into it some more.

Share this post


Link to post

I'd say, instead of making the pistol unlimited, just raise the pick-up / max amount / starting bullets amount to 999999 or something. It'll basically be unlimited without taking shell ammo. Myk gave me that advice before.

Share this post


Link to post

Thanks for the feedback.

I thought it might have been a bug, but I see now it is not.

Setting the starting ammo to 99999 won't help in my case. I need the FireMissile action and cannot use existing ammo :-(.
I will have to figure out a creative work-around. At least now I won't waste my time looking in the wrong direction (thinkiing it is a PrBoom bug).

So it is back to the drawing board for me.

Thanks again and keep up the good work guys!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×