summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4eec31f)
raw | patch | inline | side by side (parent: 4eec31f)
author | Stas'M <x86corez@gmail.com> | |
Fri, 18 May 2018 15:23:59 +0000 (18:23 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Fri, 18 May 2018 15:24:10 +0000 (18:24 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_res_downloader.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 3accde9348a9f72d31ceb9910e1a8470aabd9dac..81eade6f2a55ab1d42b15ba88d88cc92570d7961 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
gWADHash := MD5File(MapsDir + NewWAD);
g_Game_LoadWAD(NewWAD);
end else
- // hash recieved in MC_RECV_GameEvent -> NET_EV_MAPSTART
+ // hash received in MC_RECV_GameEvent -> NET_EV_MAPSTART
g_Game_ClientWAD(NewWAD, gWADHash);
end else
ResName := Map;
index fcb4ad9047279574b9622aa6158f23ed4373e7a1..78b0b2803ddccde223d34b5705f9def7191d5b63 100644 (file)
begin
mapData := MapDataFromMsgStream(msgStream);
msgStream.Free;
- end;
+ end else
+ mapData.FileSize := 0;
for i := 0 to High(mapData.ExternalResources) do
begin
MC_SEND_ResRequest(mapData.ExternalResources[i].Name);
msgStream := g_Net_Wait_Event(NET_MSG_RES_RESPONSE);
+ if msgStream = nil then
+ continue;
+
resData := ResDataFromMsgStream(msgStream);
resStream := createDiskFile(GameDir+'/wads/'+mapData.ExternalResources[i].Name);
end;
Result := SaveWAD(MapsDir, ExtractFileName(FileName), mapData.FileData);
+ if mapData.FileSize = 0 then
+ DeleteFile(Result);
end;
end.