Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002880Zandronum[All Projects] Bugpublic2016-10-11 06:272016-10-12 23:39
Reporterunknownna 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version2.1 
Target VersionFixed in Version 
Summary0002880: cl_noammoswitch switches to empty weapons if Weapon.AmmoUse is 0 or when AltFire state is present
DescriptionI was testing some mods and got confused wondering why the client was able to switch over to weapons without any ammo despite having cl_noammoswitch set to false. I investigated the issue further and narrowed it down to cl_noammoswitch not working if the weapons have Weapon.AmmoUse1/2 set to 0 or if the weapons have an AltFire state present in the DECORATE code.

It's been this way since forever. It's also broken in Skulltag 98d.
Steps To Reproduce1. zandronum -iwad doom2.wad -file pwo_ammotype_02.wad +map map01 +cl_noammoswitch 0
2. Fire the chaingun, using up the ammo.
3. Notice how you can still cycle between your empty weapons despite not having any ammo.
Additional Information
Actor Pistol_02 : Pistol
{
    Weapon.SlotNumber 2
    Weapon.AmmoUse1 0
    Weapon.AmmoUse2 0
    Weapon.AmmoType1 "Clip"
    Weapon.AmmoType2 "Clip"
    Tag "Pistol Weapon.AmmoUse1/2 0"
}

Actor Chaingun_02 : Chaingun
{
    Weapon.SlotNumber 4
    Tag "Chaingun AltFire State Present"
    States
{
    AltFire:
        CHGG A 4 A_GiveInventory ("Clip", 1)
        Goto Ready
    }
}
Attached Files? file icon pwo_ammotype_02.wad [^] (1,362 bytes) 2016-10-11 06:27
png file icon Screenshot.png [^] (125,897 bytes) 2016-10-11 06:27

- Relationships

-  Notes
User avatar (0015892)
Edward-san (developer)
2016-10-11 07:29

Does changing sv_dontcheckammo on/off change the behavior?
User avatar (0015893)
unknownna (updater)
2016-10-11 07:34
edited on: 2016-10-11 07:47

I just tried it and it doesn't seem to change anything. I can still select both empty weapons. I also tested ZDoom 2.8.1 and you can also select both weapons there, so it might be a bug/side-effect inherited from the ZDoom behavior.

Although Weapon.AmmoUse 0 is technically like having infinite ammo, many mods don't seem to actually fire the weapon in the fire state unless the player has another ammo item present in the inventory.

User avatar (0015899)
unknownna (updater)
2016-10-11 18:56

I went ahead and made a bug report over at the ZDoom forums.

Can select/cycle certain weapons with empty ammo
User avatar (0015938)
unknownna (updater)
2016-10-12 23:39

It's apparently not a bug, as the engine assumes that Weapon.AmmUse1/2 is 0 by default unless you explicitly define "Weapon.AmmoUse1/2 1". And since "Weapon.AmmoUse1/2 0" is like having infinite ammo, it naturally allows you to select the weapon.

Unfortunately this seems to be a case of popular mods working around the system with their custom reloading, allowing them to bypass any "empty" status.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2016-10-11 06:27 unknownna New Issue
2016-10-11 06:27 unknownna File Added: pwo_ammotype_02.wad
2016-10-11 06:27 unknownna File Added: Screenshot.png
2016-10-11 07:29 Edward-san Note Added: 0015892
2016-10-11 07:29 Edward-san Assigned To => Edward-san
2016-10-11 07:29 Edward-san Status new => feedback
2016-10-11 07:34 unknownna Note Added: 0015893
2016-10-11 07:34 unknownna Status feedback => assigned
2016-10-11 07:42 unknownna Note Edited: 0015893 View Revisions
2016-10-11 07:47 unknownna Note Edited: 0015893 View Revisions
2016-10-11 08:34 Edward-san Assigned To Edward-san =>
2016-10-11 08:34 Edward-san Status assigned => new
2016-10-11 18:56 unknownna Note Added: 0015899
2016-10-11 18:58 unknownna Status new => acknowledged
2016-10-11 18:58 unknownna Resolution open => waiting for zdoom
2016-10-12 23:39 unknownna Note Added: 0015938
2016-10-12 23:39 unknownna Status acknowledged => closed
2016-10-12 23:39 unknownna Resolution waiting for zdoom => won't fix






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker