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
[BUG] Backpack gives improper ammo
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.
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.
- 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:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [BUG] Backpack gives improper ammo
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.
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.
Re: [BUG] Backpack gives improper ammo
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
https://github.com/coelckers/gzdoom/blo ... o.txt#L247