Lobby update ID isn't included in ingame update messages, resetting lastRecvGeneralUpdate in InitClientSync

This commit is contained in:
Regalis
2017-01-11 23:37:30 +02:00
parent 037bd09c2c
commit ed675dc75e
3 changed files with 4 additions and 2 deletions

View File

@@ -68,6 +68,8 @@ namespace Barotrauma.Networking
lastSentChatMsgID = 0;
lastRecvChatMsgID = ChatMessage.LastID;
lastRecvGeneralUpdate = 0;
lastRecvEntitySpawnID = 0;
lastRecvEntityEventID = 0;
}

View File

@@ -831,7 +831,7 @@ namespace Barotrauma.Networking
outmsg.Write((byte)ClientPacketHeader.UPDATE_INGAME);
outmsg.Write((byte)ClientNetObject.SYNC_IDS);
outmsg.Write(GameMain.NetLobbyScreen.LastUpdateID);
//outmsg.Write(GameMain.NetLobbyScreen.LastUpdateID);
outmsg.Write(ChatMessage.LastID);
outmsg.Write(Entity.Spawner.NetStateID);
outmsg.Write(entityEventManager.LastReceivedID);

View File

@@ -622,7 +622,7 @@ namespace Barotrauma.Networking
case ClientNetObject.SYNC_IDS:
//TODO: might want to use a clever class for this
c.lastRecvGeneralUpdate = Math.Max(c.lastRecvGeneralUpdate, inc.ReadUInt32());
//c.lastRecvGeneralUpdate = Math.Max(c.lastRecvGeneralUpdate, inc.ReadUInt32());
c.lastRecvChatMsgID = Math.Max(c.lastRecvChatMsgID, inc.ReadUInt32());
c.lastRecvEntitySpawnID = Math.Max(c.lastRecvEntitySpawnID, inc.ReadUInt32());
c.lastRecvEntityEventID = Math.Max(c.lastRecvEntityEventID, inc.ReadUInt32());