mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-06 10:31:23 +01:00
migrating all util files from js to ts
This commit is contained in:
parent
76f86497c7
commit
fa493989b6
39 changed files with 3174 additions and 1523 deletions
|
|
@ -271,7 +271,7 @@ window.Military = (function () {
|
|||
}
|
||||
if (node.t > expected) return;
|
||||
const r = (expected - node.t) / (node.s ? 40 : 20); // search radius
|
||||
const candidates = tree.findAll(node.x, node.y, r);
|
||||
const candidates = findAllInQuadtree(node.x, node.y, r, tree);
|
||||
for (const c of candidates) {
|
||||
if (c.t < expected && mergeable(node, c)) {
|
||||
merge(node, c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue