PhysicsBodyPosition networkevents aren't sent for items that are inside an inventory (e.g. carried by a character), items can be moved from the inventory to containers by double clicking

This commit is contained in:
Regalis
2016-05-11 20:22:32 +03:00
parent d1e9be188f
commit 11e4f5699f
3 changed files with 24 additions and 6 deletions
+1 -1
View File
@@ -701,7 +701,7 @@ namespace Barotrauma
FindHull();
Vector2 moveAmount = body.SimPosition - body.LastSentPosition;
if (moveAmount != Vector2.Zero && moveAmount.Length() > NetConfig.ItemPosUpdateDistance)
if (parentInventory == null && moveAmount != Vector2.Zero && moveAmount.Length() > NetConfig.ItemPosUpdateDistance)
{
new NetworkEvent(NetworkEventType.PhysicsBodyPosition, ID, false);
}