Unrestrict Check/DepleteAmmo's "ammocount" parameter

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Unrestrict Check/DepleteAmmo's "ammocount" parameter

Re: Unrestrict Check/DepleteAmmo's "ammocount" parameter

by Major Cooke » Thu Aug 30, 2018 1:49 pm

...Oh wait a minute, I just realized it's a virtual. I'll just override that and switch the AmmoUse parameters temporarily whenever it's using just primary or secondary for the amounts, run the super function and then swap back.

Fair enough. Glad it's a virtual at least!

Re: Unrestrict Check/DepleteAmmo's "ammocount" parameter

by Graf Zahl » Thu Aug 30, 2018 1:30 pm

Can't do. This would break the entire thing. This parameter is needed to pass default ammo use values for dehacked modifiable weapons to the function via DepleteAmmo and is being used by all of Doom's original attack functions.

Unrestrict Check/DepleteAmmo's "ammocount" parameter

by Major Cooke » Thu Aug 30, 2018 1:08 pm

CheckAmmo's and DepleteAmmo's "ammocount" parameter is limited to only DEH ammo it seems. It'd be nice to use this without having to screw with the current AmmoUse properties just to fake it.

Line 262 in a_weapons.cpp:

Code: Select all

else if (ammocount >= 0 && (WeaponFlags & WIF_DEHAMMO))

Top