EntityEvent fixes:

- Clients wait for midround syncing to finish before applying the remote state to connection panels and inventories (because the wires connected to the connection panel or items in the inventory may not exist before the EntitySpawner events have been received).
- Server writes 0 as the projectile ID if the projectile doesn't exist anymore when a Turret event is sent.
- More info in networkevent error messages.
This commit is contained in:
Joonas Rikkonen
2018-07-30 13:35:26 +03:00
parent 8c598db10b
commit 60a563fe75
9 changed files with 167 additions and 118 deletions
@@ -419,8 +419,8 @@ namespace Barotrauma.Items.Components
public void ServerWrite(NetBuffer msg, Client c, object[] extraData = null)
{
//ID of the launched projectile
msg.Write(((Item)extraData[2]).ID);
Item item = (Item)extraData[2];
msg.Write(item.Removed ? (ushort)0 : item.ID);
}
}
}