View Issue Details

IDProjectCategoryView StatusLast Update
0000342Gameplay + OpenGL(No Category)public2017-02-27 00:33
Assigned To 
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Summary0000342: TIF_NOTAKEINFINITE does not work if player has PowerInfiniteAmmo subclass.
DescriptionIf the player has a powerup that is a subclass of PowerInfiniteAmmo, TIF_NOTAKEINFINITE does not prevent the ammo item from being taken away.
Steps To Reproduce
  1. Load up GZDoom with Trailblazer_v1.4.pk3 and an IWAD of your choice (except Strife).
  2. Get a Leadspitter (summon LeadspitterPickup).
  3. Get an Ammo Junkie powerup (summon AmmoJunkieItem/give PowerAmmoJunkie).
  4. Open fire.
  5. Your ammo loaded in the clip will be taken away, despite the fact that you have a powerup which is a subclass of PowerInfiniteAmmo (PowerAmmoJunkie).
TagsNo tags attached.





2017-02-26 16:27

administrator   ~0000783

Last edited: 2017-02-26 16:28

View 3 revisions

This bug was introduced in commit e6b31dde27b47f484c4d1073cc3760cab5b4b2a3 on 2017/feb/26

I tried fixing this bug, but was unsuccessful. This was my fix: (it did not work)

Note that replacing the FindInventory call with "1" works. "player" is not null. I do not know why it is not finding the subclass object like it should be.

p_mobj.cpp (line 904):
    ((dmflags & DF_INFINITE_AMMO) || (player && FindInventory(NAME_PowerInfiniteAmmo))) && item->IsKindOf(NAME_Ammo))
    ((dmflags & DF_INFINITE_AMMO) || (player && FindInventory(NAME_PowerInfiniteAmmo, true))) && item->IsKindOf(NAME_Ammo))

Graf Zahl

Graf Zahl

2017-02-26 19:10

administrator   ~0000789

That should work. Maybe FindInventory is broken as well...
Graf Zahl

Graf Zahl

2017-02-26 19:19

administrator   ~0000790

Well, the fix works for me.


2017-02-27 00:33

administrator   ~0000794

Yeah, mistake on my part. I thought I had a PowerInfiniteAmmo in my inventory in my savegame I was using to test with but I didn't. When I did add it, it worked.

Issue History

Date Modified Username Field Change
2017-02-26 12:55 Talon1024 New Issue
2017-02-26 15:46 Rachael Assigned To => Rachael
2017-02-26 15:46 Rachael Status new => acknowledged
2017-02-26 16:00 Rachael Status acknowledged => assigned
2017-02-26 16:27 Rachael Assigned To Rachael =>
2017-02-26 16:27 Rachael Status assigned => confirmed
2017-02-26 16:27 Rachael Note Added: 0000783
2017-02-26 16:28 Rachael Note Edited: 0000783 View Revisions
2017-02-26 16:28 Rachael Note Edited: 0000783 View Revisions
2017-02-26 19:10 Graf Zahl Status confirmed => resolved
2017-02-26 19:10 Graf Zahl Resolution open => fixed
2017-02-26 19:10 Graf Zahl Note Added: 0000789
2017-02-26 19:19 Graf Zahl Note Added: 0000790
2017-02-27 00:33 Rachael Note Added: 0000794