[Not a bug] [BUG] Backpack gives improper ammo

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[BUG] Backpack gives improper ammo

Postby Dinosaur_Nerd » Sat Jan 12, 2019 11:24 pm

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
Dinosaur_Nerd
RAWR!
 
Joined: 21 Feb 2018
Location: timelocked USA 1994
Discord: https://discord.gg/7Dd8GCD

Re: [BUG] Backpack gives improper ammo

Postby Graf Zahl » Sun Jan 13, 2019 1:58 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [BUG] Backpack gives improper ammo

Postby Apeirogon » Sun Jan 13, 2019 3:41 am

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
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests