(325184804) Fix distance based attacks not registering if they hit a submarine.

This commit is contained in:
Joonas Rikkonen
2019-03-25 19:49:05 +02:00
parent 96003509b8
commit 5ec6a7fba9
36 changed files with 215 additions and 245 deletions
@@ -58,8 +58,15 @@ namespace Barotrauma.Networking
eventCount++;
continue;
}
if (msg.LengthBytes + tempBuffer.LengthBytes + tempEventBuffer.LengthBytes > MaxEventBufferLength)
//the ID has been taken by another entity (the original entity has been removed) -> write an empty event
/*else if (Entity.FindEntityByID(e.Entity.ID) != e.Entity || e.Entity.IdFreed)
{
//technically the clients don't have any use for these, but removing events and shifting the IDs of all
//consecutive ones is so error-prone that I think this is a safer option
tempBuffer.Write(Entity.NullEntityID);
tempBuffer.WritePadBits();
}*/
else
{
//no more room in this packet
break;