Fixed one missed UInt32 -> Uint16 conversion in ServerEntityEventManager

This commit is contained in:
Regalis
2017-03-09 21:35:02 +02:00
parent e406b76cd5
commit c956e7aa7f

View File

@@ -192,12 +192,12 @@ namespace Barotrauma.Networking
{
msg.Write((byte)ServerNetObject.ENTITY_EVENT_INITIAL);
//how many (unique) events the clients had missed before joining
msg.Write(client.UnreceivedEntityEventCount);
msg.Write(client.UnreceivedEntityEventCount);
//ID of the first event sent after the client joined
//(after the client has been synced they'll switch their lastReceivedID
//to the one before this, and the eventmanagers will start to function "normally")
msg.Write(events.Count == 0 ? 0 : events[events.Count - 1].ID);
msg.Write(events.Count == 0 ? (UInt16)0 : events[events.Count - 1].ID);
Write(msg, eventsToSync, client);
}
else