DEADSOFTWARE

maploader: slightly better debug logs
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 12 Oct 2019 17:50:15 +0000 (20:50 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 12 Oct 2019 17:52:21 +0000 (20:52 +0300)
src/game/g_map.pas

index 08ebadeb2929d4b429c62c9a7794173bfb0995cc..392d45b328918d865718815ad1daff07c0889db1 100644 (file)
@@ -908,18 +908,18 @@ begin
   end
   else
   begin
+    //e_LogWritefln('GetReplacementWad: 000: old=%s', [WadName]);
     result := g_Res_FindReplacementWad(WadName);
-    if (result <> WadName) then
-    begin
-      //e_LogWritefln('GetReplacementWad: old=%s; new=%s', [WadName, result]);
-    end
-    else
+    //e_LogWritefln('GetReplacementWad: 001: old=%s; new=%s', [WadName, result]);
+    if (result = WadName) then
     begin
       result := GameDir+'/wads/'+result;
+      //e_LogWritefln('GetReplacementWad: 002: old=%s; new=%s', [WadName, result]);
     end;
   end;
 end;
 
+
 function CreateTexture(RecName: AnsiString; Map: string; log: Boolean): Integer;
 var
   WAD: TWADFile;
@@ -1699,7 +1699,7 @@ begin
     if (gCurrentMap = nil) then
     begin
       FileName := g_ExtractWadName(Res);
-      e_WriteLog('Loading map WAD: '+FileName, TMsgType.Notify);
+      e_LogWritefln('Loading map WAD [%s] (res=[%s])', [FileName, Res], TMsgType.Notify);
       g_Game_SetLoadingText(_lc[I_LOAD_WAD_FILE], 0, False);
 
       WAD := TWADFile.Create();