mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
fix: #970
This commit is contained in:
parent
b3e2aa00e7
commit
c486506af6
3 changed files with 3 additions and 2 deletions
|
|
@ -137,6 +137,7 @@ function find(x, y, radius = Infinity) {
|
|||
|
||||
// return closest cell index
|
||||
function findCell(x, y, radius = Infinity) {
|
||||
if (!pack.cells?.q) return;
|
||||
const found = pack.cells.q.find(x, y, radius);
|
||||
return found ? found[2] : undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue