DEADSOFTWARE

mplat bug: it was EXTREMELY wise to ask monster grid for old panel position
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Sun, 3 Sep 2017 15:35:13 +0000 (18:35 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Sun, 3 Sep 2017 15:35:43 +0000 (18:35 +0300)
src/game/g_panel.pas

index ffd7c50ffc52fa8e093598b6fb62911aafc004b8..809f78152feebf04a2591457eda8e4ec257b1963 100644 (file)
@@ -495,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);