Resetting EntityEvent & EntitySpawner IDs when starting a new round, LOS effect is enabled when a client takes control of a character

This commit is contained in:
Regalis
2017-01-09 18:22:37 +02:00
parent a75ef8ee51
commit ff96f152ce
6 changed files with 15 additions and 2 deletions

View File

@@ -31,7 +31,6 @@ namespace Barotrauma.Networking
//write into a temporary buffer so we can write the length before the actual data
NetBuffer tempBuffer = new NetBuffer();
WriteEvent(tempBuffer, e, recipient);
tempBuffer.WritePadBits();
Debug.Assert(
tempBuffer.LengthBytes < 256,
@@ -40,6 +39,7 @@ namespace Barotrauma.Networking
msg.Write((UInt16)e.Entity.ID);
msg.Write((byte)tempBuffer.LengthBytes);
msg.Write(tempBuffer);
msg.WritePadBits();
}
}