[14.22] Spawning particles, smoke or fire entities can cause desyncs
Posted: Tue Apr 18, 2017 10:06 am
I made some mods (AAI) that allow combinators to move vehicles autonomously and they are becoming very popular. With the increased popularity has come many many more desync reports. Quite a few people have checked the code for script issues that could cause desyncs but after after much testing it seems to be narrowed down to particle and/or fire entities and not a scripting problem.
The vehicles spawn smoke particles, mining particles when they mine, shell particles when they shoot. These particles are spawned with surface.create_entity and are not tracked afterward.
Reference Level
Desynced Level
In a small testing setup with just my mods things can be stable in multiplayer for hours, but in complicated bases and other mods the problem is much more likely to occur quickly.
Vehicles also have a 'fire' type entity attached in order to provide some light and vehicles sounds even when a player is not driving, these entities are tracked to update their position. I have a hunch that these entities might expire in an inconsistent way that may be partly responsible.
Desync from Arumba
Desync Report: https://www.youtube.com/playlist?list=P ... Naih_-Qoi-
Modpack: https://www.dropbox.com/s/uk3802lvkuunw ... mo.7z?dl=0
Desync Report: Desync from Nilaus
Desync Report: https://drive.google.com/file/d/0B8uzPm ... sp=sharing
Modpack: https://drive.google.com/drive/folders/ ... sp=sharing
The vehicles spawn smoke particles, mining particles when they mine, shell particles when they shoot. These particles are spawned with surface.create_entity and are not tracked afterward.
Reference Level
Code: Select all
<targeter name=smoke position={-199.4492187500, -54.2109375000}></targeter><targeter name=smoke position={-221.4335937500, -54.2187500000}></targeter>
Code: Select all
<targeter name=smoke position={-199.4648437500, -54.2812500000}></targeter><targeter name=smoke position={-221.4257812500, -54.2617187500}></targeter>
Vehicles also have a 'fire' type entity attached in order to provide some light and vehicles sounds even when a player is not driving, these entities are tracked to update their position. I have a hunch that these entities might expire in an inconsistent way that may be partly responsible.
Desync from Arumba
Desync Report: https://www.youtube.com/playlist?list=P ... Naih_-Qoi-
Modpack: https://www.dropbox.com/s/uk3802lvkuunw ... mo.7z?dl=0
Desync Report: Desync from Nilaus
Desync Report: https://drive.google.com/file/d/0B8uzPm ... sp=sharing
Modpack: https://drive.google.com/drive/folders/ ... sp=sharing