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

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003863Zandronum[All Projects] Bugpublic2020-09-27 11:492021-08-12 18:24
Assigned ToKaminsky 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.0 
Target Version3.1Fixed in Version3.1-beta 
Summary0003863: A_CustomPunch does not consume ammo online
DescriptionI'm not sure if this was already reported before but A_CustomPunch does not consume ammo in netgames, it looks as if the hits do register and the game recognizes that the ammo was consumed but the ammo counter does not deplete, and the game thinks I still have the weapon but uses a different weapon instead, this becomes a major problem for melee weapons that are dependant on ammo count to perform different actions and jump. If what I'm saying doesn't make sense I provided an example file for you to test, host a lan server with it and you'll start seeing the problems. it works perfectly fine offline but then you go online and things get real weird.
Attached Files? file icon BrownBottle.pk3 [^] (98,060 bytes) 2020-09-27 11:49

- Relationships

-  Notes
User avatar (0021544)
GarryMcGooble (reporter)
2020-09-28 08:14
edited on: 2020-09-28 15:07

Adding the +INVENTORY.ALWAYSPICKUP flag to your ActionAmmo actor seems to fix the issue

After digging some more it appears that A_CustomPunch issues the GiveInventory server command, expecting it to update the client's ammo count. However, GiveInventory calls CallTryPickup, which eventually results in AAmmo::HandlePickup being called. This function only tries to add ammo, and returns true if the player has max ammo, which they always do on the client's side right now. This can be fixed by replacing the two GiveInventory commands in A_CustomPunch with TakeInventory commands

User avatar (0021550)
Torr Samaho (administrator)
2020-10-18 19:27

Thanks a lot! You patch looks fine and I added it.
User avatar (0021723)
Kaminsky (developer)
2021-08-12 18:24

I tested this with the weekly unofficial 3.1 beta builds and A_CustomPunch now consumes ammo and updates the clients properly in online games.

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
2020-09-27 11:49 Unknown New Issue
2020-09-27 11:49 Unknown File Added: BrownBottle.pk3
2020-09-28 08:14 GarryMcGooble Note Added: 0021544
2020-09-28 15:07 GarryMcGooble Note Edited: 0021544 View Revisions
2020-10-18 19:27 Torr Samaho Note Added: 0021550
2020-10-18 19:28 Torr Samaho Status new => needs testing
2020-10-18 19:28 Torr Samaho Target Version => 3.1
2021-08-12 18:24 Kaminsky Note Added: 0021723
2021-08-12 18:24 Kaminsky Status needs testing => resolved
2021-08-12 18:24 Kaminsky Fixed in Version => 3.1-beta
2021-08-12 18:24 Kaminsky Resolution open => fixed
2021-08-12 18:24 Kaminsky Assigned To => Kaminsky

Questions or other issues? Contact Us.


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker