about summary refs log tree commit diff
path: root/src/engine/server/server.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-02-16 12:07:54 +0100
committeroy <Tom_Adams@web.de>2011-02-16 12:07:54 +0100
commitb63dbfede548bb9eb0ad7a5b7a83a8a3fac1e1f1 (patch)
treeaeb3b858a3768e580868f2877e3fcc92822eb9e9 /src/engine/server/server.cpp
parent927954a53bd4d1322e5474fd054d3241212394c4 (diff)
downloadzcatch-b63dbfede548bb9eb0ad7a5b7a83a8a3fac1e1f1.tar.gz
zcatch-b63dbfede548bb9eb0ad7a5b7a83a8a3fac1e1f1.zip
fixed problems with map downloading if the map changes during download. Closes #236
Diffstat (limited to 'src/engine/server/server.cpp')
-rw-r--r--src/engine/server/server.cpp4
1 files changed, 3 insertions, 1 deletions
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);