Page 1 of 1

[Rseding91] [0.13.6] Desync when "Unit" in hand touches conveyor entities

Posted: Mon Jul 11, 2016 3:02 am
by kyranzor
Hi there!

In my mod "Robot Army" my robotic soldiers are "Unit" entities (aka, biters) and players can place them down by hand, or into an assembling machine which my script spawns units based on the results of that.

When players are running around with a spawnable unit in their hand, and the green placement indicator/ghost of the entity touches either a conveyor belt, a splitter, or an underground belt entrance/exit, multiplayer games de-sync. It only happens when more than one player is in the server too, I cannot seem to reproduce it properly with only myself in the server. I have a report from someone who was making it happen while alone in the server (could be related to ping or server delay as well?) . The initial report of this bug from one of my mod users running a server for my mod can provide this youtube video https://www.youtube.com/watch?v=6mjPUbRHpbE of how to reproduce the issue, although it's not quite obvious. At the very end when the desync occurs, he equips the droid item in his hand and it brushes over a belt entity and bam - desync.

Edit: new video by my mod user, very clearly shows what happens https://youtu.be/tBleHSlH0YI

During my later testing to reproduce it, i was able to get 100% repeatable situation with the desync - in my case, if >= 2 players are on the server, if ANY of the players equips ANY placeable "unit" entity (any of my spawnable droid units) in their hand and the cursor goes over ANY belt entity, the desync is caused. If i'm in singleplayer, or seemingly alone in my own LAN server, I cannot make it desync.

My guess is that the entity placement ghost/outline/indicator thing is touched the conveyor belts, and the belts are trying to "move" it, but the player's cursor position gives conflicting positions, causing the desync between what the client sees and what the server/other connected clients see or expect from that situation.

Here is a one-drive link to the bug report zip file, containing the desync report (from my second player, local machine on LAN), a log-current and log-previous (same testing, so still relevant), the exact mod used, and the map used (even though the desync report contains the map..). Also contained are 4 images in sequence (numbered) showing what I do and what happens.
https://1drv.ms/u/s!Ak4ccAOnnfQYgbZq71MSpkTQuL4Klw

Re: [Rseding91] [0.13.6] Desync when "Unit" in hand touches conveyor entities

Posted: Mon Jul 11, 2016 10:37 am
by Rseding91
Fixed for 0.13.8.

Re: [Rseding91] [0.13.6] Desync when "Unit" in hand touches conveyor entities

Posted: Mon Jul 11, 2016 1:20 pm
by kyranzor
Thanks mate!

Re: [Rseding91] [0.13.6] Desync when "Unit" in hand touches conveyor entities

Posted: Mon Jul 11, 2016 6:00 pm
by supernet2
That is awesome!