MantisBT - Zandronum
View Issue Details
0000534Zandronum[All Projects] Bugpublic2011-07-28 09:152018-08-27 18:58
0000534: Ammo desync if you have a high ping. Client thinks that it didn't use any ammo.
If you fire your weapon and then instantly pick up some ammo for the corresponding weapon your ammo count will desync. Your client thinks that it didn't use any ammo when you fired your weapon.
1. Start a standard COOP server (skill 3) with the example WAD loaded.
2. Connect a client to the server with an emulated ping of 300 ms.
3. Join the game.
4. Pick up the RL.
5. Pick up the RocketAmmo actor immediately after pressing +attack.

When you pick up the RL you'll have 2 rockets.
When you pick up the rocket ammo after pressing +attack you'll have 3 rockets locally. It should be 2.
You may then fire 2 rockets, but the last one will be a NULL rocket.
AFAICT, this has nothing to do with the weapon A_Raise/A_Lower desyncs. It still desyncs in 3287.
No tags attached.
related to 0000193closed Torr Samaho Able to fire weapon before it's passed A_Raise 
related to 0001116feedback  Client fires weapon too early after respawning 
? ammo_desync_test_01.wad (720) 2011-07-28 09:15
Issue History
2011-07-28 09:15unknownnaNew Issue
2011-07-28 09:15unknownnaFile Added: ammo_desync_test_01.wad
2011-07-28 09:16unknownnaRelationship addedrelated to 0000193
2011-07-29 01:45Torr SamahoNote Added: 0001995
2011-07-29 02:59unknownnaNote Added: 0002004
2011-07-29 03:00unknownnaNote Edited: 0002004bug_revision_view_page.php?bugnote_id=2004#r1016
2012-03-01 07:20TIHanNote Added: 0002726
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2014-06-12 20:15WatermelonNote Added: 0009154
2014-06-12 20:15WatermelonStatusnew => feedback
2015-06-06 20:27unknownnaNote Added: 0012560
2015-06-06 20:27unknownnaStatusfeedback => new
2015-07-16 03:53unknownnaNote Added: 0012951
2018-08-27 18:58unknownnaRelationship addedrelated to 0001116
2018-08-27 18:58unknownnaStatusnew => confirmed

Torr Samaho   
2011-07-29 01:45   
The problem sounds like it is caused by timing issues very similar to the one responsible for the weapon sync issue and is most likely very difficult to fix, I can't say this for sure yet though.

Nevertheless, I'm pretty sure that Skulltag has been acting like this for ages now (if not since forever). Since nobody complained about this yet, I doubt that it's a major issue in practice.
2011-07-29 02:59   
(edited on: 2011-07-29 03:00)
> Since nobody complained about this yet, I doubt that it's a major issue in practice.

One thing to remember is that many people have adopted a "just-deal-with-it" attitude when it comes to ST sync bugs. I don't know why, but it seems that it's the general consensus. I'm pretty sure that people have been affected by this desync many times by now. We have better tools now (ping emulator) so it's a lot easier for us to find these sync issues on our own LAN servers and reproduce them, compared to how it used to be in the past.

It's only thanks to Zalewa's ping emulator that I'm able to reliably reproduce the desyncs.

2012-03-01 07:20   
There is probably a lot going on dealing with ammo than I know about.

From observations and code, when you pick up ammo, the client gets updated with the full amount. Just curious if incremental amounts have been attempted? Such as, I have 2 rockets, then I pick up one rocket, the server tells the client who picked up the ammo, to increase by one, rather than setting his amount at 3. Of course, clients who didn't pick up would get the full amount on the client who picked up the ammo.
2014-06-12 20:15   
Still the same in Zan 2.0?
2015-06-06 20:27   
2015-07-16 03:53   
Quote from AlexMax
By the way, if you need an easy way to test for weapon desync, BFGSHOOT in Duel40 is a really easy way to make said desyncs appear. Play it against a bot, and you can make the BFG ball desync from the weapon animation really easily over the course of normal play.

You're very likely to encounter this desync in BFGSHOOT if you have a ping of 250 since it happens when you pick up ammo immediately after running out of ammo.