MantisBT - Zandronum
View Issue Details
0003389Zandronum[All Projects] Bugpublic2018-03-02 13:162018-03-02 13:18
Korshun 
 
normalminoralways
newopen 
MicrosoftWindowsXP/Vista/7
3.0 
 
0003389: SetWeapon desyncs if called during the first moments of new map
If SetWeapon is called shortly after loading a new map, it is ignored serverside. But clientside, it is still executed. This causes the client to see the wrong weapon selected, and leads to further permanent ammo desyncs as the client attemps to shoot it.

After a second or so of server playing a new map, SetWeapon begins to work properly.
The example wad defines a player class that starts with a shotgun and the BFG. By default, the BFG is selected.

An ENTER script is defined to make the player start with the shotgun selected instead of the BFG:
script 1 ENTER
{
    SetWeapon("Shotgun");
}

To trigger the bug, you need to be on a real server and join very quickly after a new map loaded. You can do this either by creating a new server and joining very quickly after connecting, or by doing the following:
1. join
2. select BFG
3. changemap to another map
4. shoot immediately after joining

You'll see that you have the shotgun selected. But if you fire it, you'll actually shoot the BFG instead. Ammo counts will also permanently desync due to being predicted clientside instead of being set serverside.
No tags attached.
? setweapon-enter-desync.wad (568) 2018-03-02 13:16
https://zandronum.com/tracker/file_download.php?file_id=2313&type=bug
Issue History
2018-03-02 13:16KorshunNew Issue
2018-03-02 13:16KorshunFile Added: setweapon-enter-desync.wad
2018-03-02 13:18KorshunNote Added: 0019098

Notes
(0019098)
Korshun   
2018-03-02 13:18   
Forgot to tell you, this bug is present since at least 2.1.2.