(718d22401) Don't attempt to send position updates for items that have no enabled physics body (e.g. attached items). Closes #1376

This commit is contained in:
Joonas Rikkonen
2019-03-31 19:13:24 +03:00
parent ceb6bf673d
commit 9e1a4d8902
@@ -1370,7 +1370,8 @@ namespace Barotrauma.Networking
while (!c.NeedsMidRoundSync && c.PendingPositionUpdates.Count > 0)
{
var entity = c.PendingPositionUpdates.Peek();
if (entity == null || entity.Removed)
if (entity == null || entity.Removed ||
(entity is Item item && item.PositionUpdateInterval == float.PositiveInfinity))
{
c.PendingPositionUpdates.Dequeue();
continue;