Build 0.20.0.0

This commit is contained in:
Markus Isberg
2022-10-27 17:54:57 +03:00
parent 05c7b1f869
commit edaf4b09fe
197 changed files with 4344 additions and 1773 deletions

View File

@@ -1332,16 +1332,18 @@ namespace Barotrauma
}
}
private void TrySendNetworkUpdate(ISerializableEntity entity, SerializableProperty property)
private static void TrySendNetworkUpdate(ISerializableEntity entity, SerializableProperty property)
{
if (entity is ItemComponent e)
if (GameMain.Client != null)
{
entity = e.Item;
}
if (GameMain.Client != null && entity is Item item)
{
GameMain.Client.CreateEntityEvent(item, new Item.ChangePropertyEventData(property));
if (entity is Item item)
{
GameMain.Client.CreateEntityEvent(item, new Item.ChangePropertyEventData(property, item));
}
else if (entity is ItemComponent ic)
{
GameMain.Client.CreateEntityEvent(ic.Item, new Item.ChangePropertyEventData(property, ic));
}
}
}