Submarine position syncing improvements

This commit is contained in:
Regalis
2016-12-10 19:53:35 +02:00
parent 1f454d593e
commit 3411448ae8
4 changed files with 36 additions and 22 deletions
+7
View File
@@ -1194,6 +1194,13 @@ namespace Barotrauma
index++;
}
//position with the same timestamp already in the buffer (duplicate packet?)
// -> no need to add again
if (index < subBody.MemPos.Count && sendingTime == subBody.MemPos[index].Timestamp)
{
return;
}
subBody.MemPos.Insert(index, new PosInfo(newTargetPosition, Direction.Right, sendingTime));
}
}