DEADSOFTWARE

loadgame: set correct panel enabled state
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 25 Aug 2017 13:29:40 +0000 (16:29 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 25 Aug 2017 13:30:31 +0000 (16:30 +0300)
src/game/g_map.pas

index d93f0aa8aec41cda0d3b6dc3d3ad5a7253e59ec9..681e182d7b1583834630e5a8fd7999ac4b65cbf9 100644 (file)
@@ -2768,7 +2768,8 @@ var
         end;
       // Çàãðóæàåì ïàíåëü:
         panels[i].LoadState(PAMem);
-        panels[i].arrIdx := i;
+        if (panels[i].arrIdx <> i) then raise Exception.Create('g_Map_LoadState: LoadPanelArray: Wrong Panel arrIdx');
+        if (panels[i].proxyId >= 0) then mapGrid.proxyEnabled[panels[i].proxyId] := panels[i].Enabled;
       end;
     end;