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
0000553Zandronum[All Projects] Bugpublic2011-08-07 17:162018-08-27 06:46
Assigned To 
PlatformOSOS Version
Product Version98d 
Target VersionFixed in Version 
Summary0000553: SSG A_CheckReload coop spy desync
DescriptionAttached screenshot. The coop spying client ignores A_CheckReload.
Steps To Reproduce1. Start a standard COOP server.
2. Connect 2 clients to the server.
3. Join the game with client A.
4. "give supershotgun" in the console with client A.
5. "spynext" in the console with client B.
6. Use all the shell ammo with client A.
Attached Filespng file icon screenshot.png [^] (103,220 bytes) 2011-08-07 17:16

- Relationships
related to 0000540resolvedLeonard Weapon selection is desynced between clients 
related to 0001020resolvedLeonard BFG coop spy sound desync 
related to 0001041resolvedLeonard +attack desync between clients causes ammo values to desync 

-  Notes
User avatar (0004606)
unknownna (updater)
2012-09-07 08:00

    SHT2 A 3
    SHT2 A 7 A_FireShotgun2
    SHT2 B 7
    SHT2 C 7 A_CheckReload
    SHT2 D 7 A_OpenShotgun2
    SHT2 E 7
    SHT2 F 7 A_LoadShotgun2
    SHT2 G 6
    SHT2 H 6 A_CloseShotgun2
    SHT2 A 5 A_ReFire
    Goto Ready
    // unused states
    SHT2 B 7
    SHT2 A 3
    Goto Deselect


Quote from ZDoom Wiki
This function checks whether the player still has enough ammunition for another attack with the current weapon. If not, it starts a weapon change.
User avatar (0004821)
unknownna (updater)
2012-09-27 02:16

A_ReFire is also affected. The coop spying client will ignore it.
User avatar (0008571)
Edward-san (developer)
2014-04-13 22:23
edited on: 2014-04-13 22:23

If I comment out this code in the function AWeapon::CheckAmmo in a_weapons.cpp:

// [BB] Clients should only handle out of ammo weapon switches for themself, since
// they sometimes don't know the exact ammount of ammo the other players have. They
// are informed by the server of the weapon change anyway.
if ( (( NETWORK_GetState( ) == NETSTATE_CLIENT ) || ( CLIENTDEMO_IsPlaying( ))) && ( Owner->player - players != consoleplayer ))
    return false;

the desync is fixed. When and why was this code introduced?

User avatar (0008574)
Torr Samaho (administrator)
2014-04-14 06:18

Quote from Edward-san

When and why was this code introduced?

hg annotate is a very convenient way to answer these kind of questions: [^]
User avatar (0008575)
Edward-san (developer)
2014-04-14 08:40

ah, damn ...

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
2011-08-07 17:16 unknownna New Issue
2011-08-07 17:16 unknownna File Added: screenshot.png
2011-08-07 17:17 unknownna Relationship added related to 0000540
2011-08-07 17:20 unknownna Status new => confirmed
2012-06-09 13:22 Torr Samaho Category General => Bug
2012-09-07 08:00 unknownna Note Added: 0004606
2012-09-07 10:35 unknownna Summary Client sees other client finish weapon fire sequence before lowering weapon after using final ammo => SSG A_CheckReload coop spy desync
2012-09-07 10:35 unknownna Description Updated View Revisions
2012-09-07 10:35 unknownna Relationship added related to 0001020
2012-09-27 02:16 unknownna Note Added: 0004821
2014-04-13 22:23 Edward-san Note Added: 0008571
2014-04-13 22:23 Edward-san Note Edited: 0008571 View Revisions
2014-04-14 06:18 Torr Samaho Note Added: 0008574
2014-04-14 08:40 Edward-san Note Added: 0008575
2018-08-27 06:46 unknownna Relationship added related to 0001041

Questions or other issues? Contact Us.


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker