Rivens Train Routes


This mod adds routes that are shared among trains. (youtube demo included)

Tweaks
3 years ago
0.16 - 1.1
562
Trains

g Possible source of desync issues

3 years ago
(updated 3 years ago)

I was curious about the desync issues mentioned in the other thread, so I took a look at your code. I think I might have found a possible cause. Between the lines 72 and 83, you initialize a bunch of variables that later get changed during events. AFAICT these are not saved to the global table and therefore are not synchronized between players.
See also this part of the wiki. The wiki only talks about local variables, but the same should apply to global variables that are not part of the 'global' table. (only this table is saved/synchronized between players). If, for example, a player joins the game at a later point, isFirstTick is set to true on their machine when loading the game, while it may be false for other players.

Don't know if changing this fixes the issue, but it might be worth a try.

3 years ago

Thanks, will look into it!

3 years ago

Thanks, that wiki-page was enlightning. I moved the (changing) global state to the global-variable. I hope this fixes it.

New response