DEADSOFTWARE

loading game now properly fixes enabled/disabled state for proxy
[d2df-sdl.git] / src / game / g_panel.pas
index 3c95a56ffe7f3b07724ad060b99a995f7fad3c26..7e6a135bf13bb233ca5b9b65f03af49ac21fec26 100644 (file)
@@ -93,7 +93,7 @@ type
     procedure   SaveState(var Mem: TBinMemoryWriter);
     procedure   LoadState(var Mem: TBinMemoryReader);
 
-    procedure positionChanged ();
+    procedure positionChanged (); inline;
 
     function isGBack (): Boolean; inline; // gRenderBackgrounds
     function isGStep (): Boolean; inline; // gSteps
@@ -439,7 +439,7 @@ begin
 end;
 
 
-procedure TPanel.positionChanged ();
+procedure TPanel.positionChanged (); inline;
 begin
   if (proxyId >= 0) then mapGrid.moveBody(proxyId, X, Y);
 end;
@@ -784,7 +784,8 @@ begin
   Mem.ReadInt(mMovingEnd.Y);
   Mem.ReadBoolean(mMovingActive);
 
-  if (proxyId >= 0) then mapGrid.moveBody(proxyId, X, Y);
+  positionChanged();
+  mapGrid.proxyEnabled[proxyId] := FEnabled;
 end;
 
 end.