X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fz_aabbtree.pas;h=5b3fa623d9b13dd14d4f8a6c695d5242f1b4ce50;hb=081ca9c0120de313aae7a94d1fe50b275cf2176d;hp=31b6dd41969aff815aa266d296d7142154251dc2;hpb=31fadda69508ddb1f225a2a471c1be888148ffac;p=d2df-sdl.git diff --git a/src/game/z_aabbtree.pas b/src/game/z_aabbtree.pas index 31b6dd4..5b3fa62 100644 --- a/src/game/z_aabbtree.pas +++ b/src/game/z_aabbtree.pas @@ -195,7 +195,7 @@ type public // called when a overlapping node has been found during the call to forEachAABBOverlap() // return `true` to stop - type TQueryOverlapCB = function (abody: TTreeFlesh; objx, objy, objw, objh: Integer; atag: Integer): Boolean is nested; + type TQueryOverlapCB = function (abody: TTreeFlesh; atag: Integer): Boolean is nested; type TSegQueryCallback = function (abody: TTreeFlesh; ax, ay, bx, by: Single): Single is nested; // return dist from (ax,ay) to abody TSegmentQueryResult = record @@ -1249,7 +1249,7 @@ begin {$IFDEF aabbtree_query_count}Inc(mNodesDeepVisited);{$ENDIF} if ((node.tag and tagmask) <> 0) then begin - if (visitor(node.flesh, node.aabb.minX, node.aabb.minY, node.aabb.maxX, node.aabb.maxY, node.tag)) then begin result := nodeId; bigstack := nil; exit; end; + if (visitor(node.flesh, node.tag)) then begin result := nodeId; bigstack := nil; exit; end; end; end else @@ -1458,7 +1458,7 @@ function TDynAABBTree.pointQuery (ax, ay: TreeNumber; cb: TQueryOverlapCB): TTre begin result := node.aabb.contains(ax, ay); end; - function dummycb (abody: TTreeFlesh; objx, objy, objw, objh: Integer; atag: Integer): Boolean; begin result := false; end; + function dummycb (abody: TTreeFlesh; atag: Integer): Boolean; begin result := false; end; var nid: Integer; caabb: AABB2D; @@ -1486,7 +1486,7 @@ var result := node.aabb.intersects(curax, curay, curbx, curby); end; - function visitor (flesh: TTreeFlesh; objx, objy, objw, objh: Integer; tag: Integer): Boolean; + function visitor (flesh: TTreeFlesh; tag: Integer): Boolean; var hitFraction: Single; begin