Server sends ServerEntityEvents to clients, NetEntityEvents can contain an object array which will be passed to the serializable entity (now only used for ItemComponent indices)

This commit is contained in:
Regalis
2016-11-13 13:56:48 +02:00
parent c314b37029
commit 498c72c64a
24 changed files with 133 additions and 43 deletions
@@ -538,7 +538,7 @@ namespace Barotrauma.Items.Components
}
}
public override void ClientWrite(NetBuffer msg)
public override void ClientWrite(NetBuffer msg, object[] extraData = null)
{
msg.Write(autoTemp);
msg.WriteRangedSingle(shutDownTemp, 0.0f, 10000.0f, 8);
@@ -556,7 +556,7 @@ namespace Barotrauma.Items.Components
FissionRate = msg.ReadRangedSingle(0.0f, 100.0f, 8);
}
public override void ServerWrite(NetBuffer msg, Client c)
public override void ServerWrite(NetBuffer msg, Client c, object[] extraData = null)
{
msg.WriteRangedSingle(temperature, 0.0f, 10000.0f, 16);