Zandronum Chat @ irc.zandronum.com
#zandronum
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:492020-10-18 19:28
ReporterUnknown 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Statusneeds testingResolutionopen 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.0 
Target Version3.1Fixed in Version 
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

EDIT
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.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
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






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker