index dcb8dc09b68a6c8afb434b4f4c3cbabcb1e347f7..a52ddf1738be26e9b78ebd1e22cbd34ba76cbc55 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
type
TMonsAlongLineCB = function (mon: TMonster; tag: Integer): Boolean is nested;
type
TMonsAlongLineCB = function (mon: TMonster; tag: Integer): Boolean is nested;
-function g_Mons_alongLine (x0, y0, x1, y1: Integer; cb: TMonsAlongLineCB): TMonster;
+function g_Mons_AlongLine (x0, y0, x1, y1: Integer; cb: TMonsAlongLineCB; log: Boolean=false): TMonster;
var
var
monsGrid: TMonsterGrid = nil;
monsGrid: TMonsterGrid = nil;
-function g_Mons_alongLine (x0, y0, x1, y1: Integer; cb: TMonsAlongLineCB): TMonster;
+function g_Mons_AlongLine (x0, y0, x1, y1: Integer; cb: TMonsAlongLineCB; log: Boolean=false): TMonster;
begin
if not assigned(cb) then begin result := nil; exit; end;
begin
if not assigned(cb) then begin result := nil; exit; end;
- result := monsGrid.forEachAlongLine(x0, y0, x1, y1, cb);
+ result := monsGrid.forEachAlongLine(x0, y0, x1, y1, cb, -1, log);
end;
end;