Closed StefanPrintezis closed 5 years ago
Does the caffeine level load incorrectly for the joining player or for everyone else? I noticed that the speed bonuses without the additional caffeine buff are saved globally, instead of seperately for each player. This might cause this to happen.
Unfortunately I can't really test multiplayer functionality of PPC, since I don't know anyone who plays Factorio and might help me investigate the issues.
The player joining has a different caffeine level for the existing ingame player. The joining player thinks that all existing player(s) have caffeine level 0, while the existing player(s) have a 0> caffeine level. This causes the desync 'crash'. You can only join a game if every ingame player has a caffeine level 0.
I've read some threads on the forums about variables getting synced if stored in the global table, but my attempts haven't been succesful as of yet.
The caffeine level is not loaded correctly when a new player joins the game. Somehow the caffeine level needs to be shared between al sessions.
I've tried imitating plantations global logic, but no luck. Ontick feels a bit weird.