diff --git a/src/game/g_grid.pas b/src/game/g_grid.pas
index 153e6faa7bcc76f8339c2165c8d12a018cfd026b..6017ad4b492dfbc436da477ccd41a685a3bca7b1 100644 (file)
--- a/src/game/g_grid.pas
+++ b/src/game/g_grid.pas
{.$DEFINE D2F_DEBUG_XXQ}
{.$DEFINE D2F_DEBUG_MOVER}
{$ENDIF}
+{.$DEFINE GRID_USE_ORTHO_ACCEL}
unit g_grid;
interface
f, ptag, distSq: Integer;
x0, y0, x1, y1: Integer;
// horizontal walker
+ {$IFDEF GRID_USE_ORTHO_ACCEL}
wklen, wkstep: Integer;
hopt: Boolean;
+ {$ENDIF}
begin
result := Default(ITP);
lastObj := Default(ITP);
end;
lq := mLastQuery;
+ {$IFDEF GRID_USE_ORTHO_ACCEL}
// if this is strict horizontal trace, use optimized codepath
if (ax0 = ax1) or (ay0 = ay1) then
begin
if wasHit and not assigned(cb) then result := lastObj else begin ex := ax1; ey := ay1; end;
exit;
end;
+ {$ENDIF}
{$IF DEFINED(D2F_DEBUG_RAYTRACE)}
if assigned(dbgRayTraceTileHitCB) then dbgRayTraceTileHitCB((xptr^ div tsize*tsize)+minx, (yptr^ div tsize*tsize)+miny);