Fixed entity ID mismatches and desync kicks caused by gap creation/removal in Structure.SetDamage. Creating the gaps on damaged walls wasn't guaranteed to happen in the same order client-side as on the server, causing the IDs to get assigned mismatching IDs and in some cases also affecting the IDs of other types of entities (see #528).

Now the structure gaps simply don't have IDs. They're never accessed by ID so I don't think there's the need to make the creation/removal go through entityspawner.
This commit is contained in:
Joonas Rikkonen
2018-07-25 17:34:10 +03:00
parent 40f4e94613
commit b309b45246
3 changed files with 41 additions and 41 deletions
@@ -322,7 +322,7 @@ namespace Barotrauma
DockedTo = new List<Submarine>();
ID = ushort.MaxValue;
base.Remove();
FreeID();
}
public bool HasTag(SubmarineTag tag)