Fixed ChangeProperty network events

This commit is contained in:
Joonas Rikkonen
2018-01-24 15:53:32 +02:00
parent 788ae63b71
commit 51ea71333e
2 changed files with 59 additions and 0 deletions
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Graphics;
using Barotrauma.Items.Components;
namespace Barotrauma
{
@@ -461,6 +462,11 @@ namespace Barotrauma
private void TrySendNetworkUpdate(ISerializableEntity entity, SerializableProperty property)
{
if (entity is ItemComponent)
{
entity = ((ItemComponent)entity).Item;
}
if (GameMain.Server != null)
{
IServerSerializable serverSerializable = entity as IServerSerializable;