DEADSOFTWARE

particle cosmetix for mplats
[d2df-sdl.git] / src / game / g_panel.pas
index 041a142b3865f54926ca6b81ba14877e1b249f06..809f78152feebf04a2591457eda8e4ec257b1963 100644 (file)
@@ -167,6 +167,11 @@ type
 
   TPanelArray = Array of TPanel;
 
+var
+  g_dbgpan_mplat_active: Boolean = {$IF DEFINED(D2F_DEBUG)}false{$ELSE}true{$ENDIF};
+  g_dbgpan_mplat_step: Boolean = false; // one step, and stop
+
+
 implementation
 
 uses
@@ -490,9 +495,13 @@ var
 begin
   if (proxyId >= 0) then
   begin
-    monsGrid.getBodyDims(proxyId, px, py, pw, ph);
+    mapGrid.getBodyDims(proxyId, px, py, pw, ph);
     if (px <> x) or (py <> y) or (pw <> Width) or (ph <> Height) then
     begin
+      {
+      e_LogWritefln('panel moved: arridx=%s; guid=%s; proxyid=%s; old:(%s,%s)-(%sx%s); new:(%s,%s)-(%sx%s)',
+        [arrIdx, mGUID, proxyId, px, py, pw, ph, x, y, width, height]);
+      }
       g_Mark(px, py, pw, ph, MARK_WALL, false);
       if (pw <> Width) or (ph <> Height) then mapGrid.moveResizeBody(proxyId, X, Y, Width, Height)
       else mapGrid.moveBody(proxyId, X, Y);
@@ -606,7 +615,7 @@ begin
     FCurFrameCount := FTextureIDs[FCurTexture].AnTex.CurrentCounter;
   end;
 
-  if mMovingActive and (not mMovingSpeed.isZero) then
+  if mMovingActive and (not mMovingSpeed.isZero) and g_dbgpan_mplat_active then
   begin
     monMoveListUsed := 0;
     nx := X+mMovingSpeed.X;