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

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000534Zandronum[All Projects] Bugpublic2011-07-28 09:152024-06-30 04:08
Assigned To 
PlatformOSOS Version
Product Version98d 
Target VersionFixed in Version 
Summary0000534: Ammo desync if you have a high ping. Client thinks that it didn't use any ammo.
DescriptionIf 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.
Steps To Reproduce1. 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.
Additional InformationAFAICT, this has nothing to do with the weapon A_Raise/A_Lower desyncs. It still desyncs in 3287.
Attached Files? file icon ammo_desync_test_01.wad [^] (720 bytes) 2011-07-28 09:15
? file icon wepdesync_emptyammo.wad [^] (1,505 bytes) 2024-06-30 04:07

- Relationships
related to 0000193closedTorr Samaho Able to fire weapon before it's passed A_Raise 
related to 0001116resolvedKaminsky Client fires weapon too early after respawning 
child of 0003980feedbackKaminsky Desync with firing weapons with WEAPON.NOAUTOFIRE flag 

-  Notes
User avatar (0001995)
Torr Samaho (administrator)
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.
User avatar (0002004)
unknownna (updater)
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.

User avatar (0002726)
TIHan (reporter)
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.
User avatar (0009154)
Watermelon (developer)
2014-06-12 20:15

Still the same in Zan 2.0?
User avatar (0012560)
unknownna (updater)
2015-06-06 20:27

User avatar (0012951)
unknownna (updater)
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.
User avatar (0023772)
unknownna (updater)
2024-06-30 04:06
edited on: 2024-06-30 04:08

After thoroughly testing the new weapon sync for a while now, I was finally able to make this particular issue easy to reproduce. I made an example wad with a bind that will reproduce it 100% of the time. You're actually likely to encounter this bug during regular CTF play if you run out of SSG ammo and then immediately pick up some shells while having a rocket launcher in your inventory, which could happen often on certain maps in the IDL wads.

1. zandronum -iwad doom2.wad -file wepdesync_emptyammo.wad -host +sv_itemrespawn 1
2. Connect a client to the server with an emulated ping of 160 and join the game.
3. Copy-paste "+attack;wait 14;-attack;+forward;wait 5;-forward;wait 25;+attack;wait 75;-attack" into the console. After firing the SSG and running out of ammo, you will move forward to pick up ammo at a certain tick, this in turn will cause the rocket launcher being selected to desync, firing missing rockets and spending ammo.
4. Spectate, re-join the game and re-enter the bind to reproduce it every time.

If the initial wait is 14 tics, it desyncs, but if it's one tic longer at 15, it no longer desyncs.
And when the desync is triggered, it will actually desync all the way between 25 tics to 69 tics, so for 44 tics.

+attack;wait 14;-attack;+forward;wait 5;-forward;wait 25;+attack;wait 75;-attack
+attack;wait 14;-attack;+forward;wait 5;-forward;wait 69;+attack;wait 75;-attack

Both binds will always reproduce the desync.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: Combinebobnt unknownna cruduxy Daedalus WaTaKiD Korshun Monsterovich
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2011-07-28 09:15 unknownna New Issue
2011-07-28 09:15 unknownna File Added: ammo_desync_test_01.wad
2011-07-28 09:16 unknownna Relationship added related to 0000193
2011-07-29 01:45 Torr Samaho Note Added: 0001995
2011-07-29 02:59 unknownna Note Added: 0002004
2011-07-29 03:00 unknownna Note Edited: 0002004 View Revisions
2012-03-01 07:20 TIHan Note Added: 0002726
2012-06-09 13:22 Torr Samaho Category General => Bug
2014-06-12 20:15 Watermelon Note Added: 0009154
2014-06-12 20:15 Watermelon Status new => feedback
2015-06-06 20:27 unknownna Note Added: 0012560
2015-06-06 20:27 unknownna Status feedback => new
2015-07-16 03:53 unknownna Note Added: 0012951
2018-08-27 18:58 unknownna Relationship added related to 0001116
2018-08-27 18:58 unknownna Status new => confirmed
2024-05-27 18:27 unknownna Relationship added child of 0003980
2024-06-30 04:06 unknownna Note Added: 0023772
2024-06-30 04:07 unknownna File Added: wepdesync_emptyammo.wad
2024-06-30 04:08 unknownna Note Edited: 0023772 View Revisions

Questions or other issues? Contact Us.


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker