diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 46251bb7d3e2684ec69a340f2ad415de97f6f821..43ccf4ff22e1b3eb6ddce0e748c52477a87007e0 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
gGameSettings.Options := InMsg.ReadLongWord();
T := InMsg.ReadLongWord();
- newResPath := g_Res_SearchSameWAD(MapsDir, WadName, gWADHash);
- if newResPath = '' then
+ //newResPath := g_Res_SearchSameWAD(MapsDir, WadName, gWADHash);
+ //if newResPath = '' then
begin
- g_Game_SetLoadingText(_lc[I_LOAD_DL_RES], 0, False);
+ //g_Game_SetLoadingText(_lc[I_LOAD_DL_RES], 0, False);
newResPath := g_Res_DownloadMapWAD(WadName, gWADHash);
if newResPath = '' then
begin
var
gWAD: String;
begin
- if LowerCase(NewWAD) = LowerCase(gGameSettings.WAD) then
- Exit;
- if not g_Game_IsClient then
+ if not g_Game_IsClient then Exit;
+
+ gWAD := g_Res_DownloadMapWAD(ExtractFileName(NewWAD), WHash);
+ if gWAD = '' then
+ begin
+ g_Game_Free();
+ g_FatalError(Format(_lc[I_GAME_ERROR_MAP_WAD], [ExtractFileName(NewWAD)]));
Exit;
+ end;
+
+ NewWAD := ExtractRelativePath(MapsDir, gWAD);
+ g_Game_LoadWAD(NewWAD);
+
+ {
+ if LowerCase(NewWAD) = LowerCase(gGameSettings.WAD) then Exit;
gWAD := g_Res_SearchSameWAD(MapsDir, ExtractFileName(NewWAD), WHash);
if gWAD = '' then
begin
end;
NewWAD := ExtractRelativePath(MapsDir, gWAD);
g_Game_LoadWAD(NewWAD);
+ }
end;
procedure g_Game_RestartRound(NoMapRestart: Boolean = False);