From b63dbfede548bb9eb0ad7a5b7a83a8a3fac1e1f1 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 16 Feb 2011 12:07:54 +0100 Subject: fixed problems with map downloading if the map changes during download. Closes #236 --- src/engine/server/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/engine/server/server.cpp') diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 30cdf259..b6d465ac 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -585,6 +585,7 @@ void CServer::SendMap(int ClientID) CMsgPacker Msg(NETMSG_MAP_CHANGE); Msg.AddString(GetMapName(), 0); Msg.AddInt(m_CurrentMapCrc); + Msg.AddInt(m_CurrentMapSize); SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH, ClientID, true); } @@ -685,7 +686,8 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket) CMsgPacker Msg(NETMSG_MAP_DATA); Msg.AddInt(Last); - Msg.AddInt(m_CurrentMapSize); + Msg.AddInt(m_CurrentMapCrc); + Msg.AddInt(Chunk); Msg.AddInt(ChunkSize); Msg.AddRaw(&m_pCurrentMapData[Offset], ChunkSize); SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH, ClientID, true); -- cgit 1.4.1