diff --git a/src/game/g_grid.pas b/src/game/g_grid.pas
index 02624b7f9eafd40c7133a49fb534699a1cd780d2..c2d4412ecc73551caad69b4d308dbb5638aaf3b7 100644 (file)
--- a/src/game/g_grid.pas
+++ b/src/game/g_grid.pas
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;
// 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);
// ////////////////////////////////////////////////////////////////////////// //
// 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;
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