Inventory syncing, objHeader is passed to the ClientRead/ServerRead methods so they can determine how to read the msg (is it an inventory update, position, input, etc)

This commit is contained in:
Regalis
2016-12-10 16:39:58 +02:00
parent 108dddf082
commit 1f454d593e
21 changed files with 262 additions and 166 deletions
+4 -4
View File
@@ -45,9 +45,9 @@ namespace Barotrauma
}
public override bool TryPutItem(Item item, System.Collections.Generic.List<InvSlotType> allowedSlots = null)
public override bool TryPutItem(Item item, System.Collections.Generic.List<InvSlotType> allowedSlots = null, bool createNetworkEvent = true)
{
bool wasPut = base.TryPutItem(item, allowedSlots);
bool wasPut = base.TryPutItem(item, allowedSlots, createNetworkEvent);
if (wasPut)
{
@@ -66,9 +66,9 @@ namespace Barotrauma
return wasPut;
}
public override bool TryPutItem(Item item, int i, bool allowSwapping)
public override bool TryPutItem(Item item, int i, bool allowSwapping, bool createNetworkEvent = true)
{
bool wasPut = base.TryPutItem(item, i, allowSwapping);
bool wasPut = base.TryPutItem(item, i, allowSwapping, createNetworkEvent);
if (wasPut)
{