MantisBT - Zandronum
View Issue Details
0000553Zandronum[All Projects] Bugpublic2011-08-07 17:162018-08-27 06:46
unknownna 
 
normalminoralways
confirmedopen 
98d 
 
0000553: SSG A_CheckReload coop spy desync
Attached screenshot. The coop spying client ignores A_CheckReload.
1. 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.
No tags attached.
related to 0000540resolved Leonard Weapon selection is desynced between clients 
related to 0001020resolved Leonard BFG coop spy sound desync 
related to 0001041resolved Leonard +attack desync between clients causes ammo values to desync 
png screenshot.png (103,220) 2011-08-07 17:16
/tracker/file_download.php?file_id=411&type=bug
png
Issue History
2011-08-07 17:16unknownnaNew Issue
2011-08-07 17:16unknownnaFile Added: screenshot.png
2011-08-07 17:17unknownnaRelationship addedrelated to 0000540
2011-08-07 17:20unknownnaStatusnew => confirmed
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2012-09-07 08:00unknownnaNote Added: 0004606
2012-09-07 10:35unknownnaSummaryClient sees other client finish weapon fire sequence before lowering weapon after using final ammo => SSG A_CheckReload coop spy desync
2012-09-07 10:35unknownnaDescription Updatedbug_revision_view_page.php?rev_id=2491#r2491
2012-09-07 10:35unknownnaRelationship addedrelated to 0001020
2012-09-27 02:16unknownnaNote Added: 0004821
2014-04-13 22:23Edward-sanNote Added: 0008571
2014-04-13 22:23Edward-sanNote Edited: 0008571bug_revision_view_page.php?bugnote_id=8571#r4632
2014-04-14 06:18Torr SamahoNote Added: 0008574
2014-04-14 08:40Edward-sanNote Added: 0008575
2018-08-27 06:46unknownnaRelationship addedrelated to 0001041

Notes
(0004606)
unknownna   
2012-09-07 08:00   
Fire:
    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

A_CheckReload

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.
(0004821)
unknownna   
2012-09-27 02:16   
A_ReFire is also affected. The coop spying client will ignore it.
(0008571)
Edward-san   
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?

(0008574)
Torr Samaho   
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:'https://bitbucket.org/Torr_Samaho/zandronum/commits/91a63db80b15a837ab0dda402ef0f9db3c95bab2 [^]'
(0008575)
Edward-san   
2014-04-14 08:40   
ah, damn ...