X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_monsters.pas;h=a52ddf1738be26e9b78ebd1e22cbd34ba76cbc55;hb=b79ddd98d923ee15f4bfd1db5111e669fc19964a;hp=dcb8dc09b68a6c8afb434b4f4c3cbabcb1e347f7;hpb=e3b318e51b50d099fe63bae0720921c9389d2434;p=d2df-sdl.git diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index dcb8dc0..a52ddf1 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -208,7 +208,7 @@ function g_Mons_getNewTrapFrameId (): DWord; 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 @@ -285,10 +285,10 @@ var 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; - result := monsGrid.forEachAlongLine(x0, y0, x1, y1, cb); + result := monsGrid.forEachAlongLine(x0, y0, x1, y1, cb, -1, log); end;