t.v. Posted January 27, 2012 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. 0 Share this post Link to post
andrewj Posted January 27, 2012 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. 0 Share this post Link to post
t.v. Posted January 27, 2012 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. 0 Share this post Link to post
entryway Posted January 27, 2012 That's what vanilla and boom do. Not a bug. 0 Share this post Link to post
TimeOfDeath Posted January 27, 2012 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. 0 Share this post Link to post
t.v. Posted January 27, 2012 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! 0 Share this post Link to post