DEADSOFTWARE

no more callback in `Grid.traceBox()` (it wasn't used anyway)
[d2df-sdl.git] / src / game / g_grid.pas
index 02624b7f9eafd40c7133a49fb534699a1cd780d2..c2d4412ecc73551caad69b4d308dbb5638aaf3b7 100644 (file)
@@ -51,7 +51,7 @@ type
     type PITP = ^ITP;
 
     type TGridQueryCB = function (obj: ITP; tag: Integer): Boolean is nested; // return `true` to stop
-    type TGridRayQueryCB = function (obj: ITP; tag: Integer; x, y, prevx, prevy: Integer): Boolean is nested; // return `true` to stop
+    //type TGridRayQueryCB = function (obj: ITP; tag: Integer; x, y, prevx, prevy: Integer): Boolean is nested; // return `true` to stop
     type TCellQueryCB = procedure (x, y: Integer) is nested; // top-left cell corner coords
 
     const TagDisabled = $40000000;
@@ -242,7 +242,7 @@ type
     // trace box with the given velocity; return object hit (if any)
     // `cb` is used unconvetionally here: if it returns `false`, tracer will ignore the object
     //WARNING: don't change tags in callbacks here!
-    function traceBox (out ex, ey: Integer; const ax0, ay0, aw, ah: Integer; const dx, dy: Integer; cb: TGridQueryCB; tagmask: Integer=-1): ITP;
+    function traceBox (out ex, ey: Integer; const ax0, ay0, aw, ah: Integer; const dx, dy: Integer; tagmask: Integer=-1): ITP;
 
     // debug
     procedure forEachBodyCell (body: TBodyProxyId; cb: TCellQueryCB);
@@ -1621,7 +1621,7 @@ end;
 // ////////////////////////////////////////////////////////////////////////// //
 // trace box with the given velocity; return object hit (if any)
 // `cb` is used unconvetionally here: if it returns `false`, tracer will ignore the object
-function TBodyGridBase.traceBox (out ex, ey: Integer; const ax0, ay0, aw, ah: Integer; const dx, dy: Integer; cb: TGridQueryCB; tagmask: Integer=-1): ITP;
+function TBodyGridBase.traceBox (out ex, ey: Integer; const ax0, ay0, aw, ah: Integer; const dx, dy: Integer; tagmask: Integer=-1): ITP;
 var
   gx, gy: Integer;
   ccidx: Integer;
@@ -1685,10 +1685,6 @@ begin
           if ((ptag and TagDisabled) = 0) and ((ptag and tagmask) <> 0) and (px.mQueryMark <> lq) then
           begin
             px.mQueryMark := lq; // mark as processed
-            if assigned(cb) then
-            begin
-              if not cb(px.mObj, ptag) then continue;
-            end;
             if not sweepAABB(ax0, ay0, aw, ah, dx, dy, px.mX, px.mY, px.mWidth, px.mHeight, @u0) then continue;
             if (minu0 > u0) then
             begin