Mancubus
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Weird bug with unlimited ammo in PrBoom
 
Author
All times are GMT. The time now is 17:28. Post New Thread    Post A Reply
t.v.
Junior Member


Posts: 217
Registered: 10-06


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.

Old Post 01-27-12 10:49 #
t.v. is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
andrewj
Senior Member


Posts: 1379
Registered: 04-02


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.

Last edited by andrewj on 01-27-12 at 11:17

Old Post 01-27-12 11:12 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
t.v.
Junior Member


Posts: 217
Registered: 10-06


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.

Old Post 01-27-12 13:06 #
t.v. is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2585
Registered: 01-04


That's what vanilla and boom do. Not a bug.

Old Post 01-27-12 14:07 #
entryway is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
TimeOfDeath
Forum Regular


Posts: 1482
Registered: 06-06


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.

Old Post 01-27-12 15:07 #
TimeOfDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
t.v.
Junior Member


Posts: 217
Registered: 10-06


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!

Old Post 01-27-12 18:24 #
t.v. is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 17:28. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Weird bug with unlimited ammo in PrBoom

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory