MantisBT - Zandronum
View Issue Details
0002699Zandronum[All Projects] Bugpublic2016-04-10 02:242016-04-10 14:47
Tribeam3rd 
 
normalminoralways
newopen 
MicrosoftWindowsXP/Vista/7
 
 
0002699: Global Vars have a different state when a script is activated between decorate and world(online)
Warning 20mb gif:'https://dl.dropboxusercontent.com/u/49758621/zanbug.gif [^]'

This gif demonstrates what happens in single player and multiplayer(I connect to a local server half way through)

In single player, the global var is updated regardless of pressing the switch and collecting the item.

In multiplayer it seems the the global var has 2 states, the state of which the switch updates, and the state of which the decorate item updates.
Run included test wad online, press switch, collect item, see different values
No tags attached.
? bug.wad (4,111) 2016-04-10 02:24
/tracker/file_download.php?file_id=1784&type=bug
Issue History
2016-04-10 02:24Tribeam3rdNew Issue
2016-04-10 02:24Tribeam3rdFile Added: bug.wad
2016-04-10 02:27Tribeam3rdNote Added: 0014686
2016-04-10 10:25Torr SamahoNote Added: 0014687

Notes
(0014686)
Tribeam3rd   
2016-04-10 02:27   
Also forgot to mention that sbarinfo(the number on the top left) only shows the version of the global var updated by the item.
(0014687)
Torr Samaho   
2016-04-10 10:25   
From what I can tell, you are observing two problems here:

First, ACS vars are not synced between client and server, so GlobalVar in SBARINFO only works properly for vars that are only set in client side scripts.

Second, ACS in DECORATE is not handled properly online. Both client and server execute the script, which makes it look as if the script calls triggered by DECORATE are counted separately.

Unfortunately, both are structural problems that are not easy to fix. ZDoom's design of this features is incompatible with our client/server architecture.

Nevertheless, the global vars should be working exactly as intended on the server. You just don't see it since some of the values you see in the example are displayed by the client, some by the server.