[BUG] Backpack gives improper ammo

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Dinosaur_Nerd
Posts: 253
Joined: Wed Feb 21, 2018 5:31 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: timelocked USA 1994
Contact:

[BUG] Backpack gives improper ammo

Post by Dinosaur_Nerd »

When playing DOOM, collecting a backpack will fill the players inventory with ammo meant for other games, IE: Hexen, Heretic, Strife.

Steps to reproduce:
1. Launch DOOM2.wad
2. Start game
3. open console
4. type "Summon Backpack"
5. press enter
6. pick up backpack
7. open console
8. type "printinv"
9. you will notice that minimissiles, mineammo, phosphorousgrenade, elecbolts, are all in your inventory in DOOM.

This is a serious issue when attempting to create scripts that deal with ammo, as the incorrect ammo is detected in the players inventory and can result in VM Aborts.

Thanks for your time,
-Dino
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [BUG] Backpack gives improper ammo

Post by Graf Zahl »

This is fully intentional because the items are needed to set the correct amount a player can carry. If you want to check ammo types in scripts you always have to consider empty items that do not represent a type you use yourself.

This is a) not a bug and b) won't be changed, it has been like this for all the 14 years since the current inventory system had been made.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: [BUG] Backpack gives improper ammo

Post by Apeirogon »

Backpack just works in that way "Find every unique type of ammoitem. Give it to the player if he doesn't have it already, and double its maximum capacity."
https://github.com/coelckers/gzdoom/blo ... o.txt#L247
Post Reply

Return to “Closed Bugs [GZDoom]”