This commit is contained in:
Azgaar 2023-08-06 23:03:43 +04:00
parent b3e2aa00e7
commit c486506af6
3 changed files with 3 additions and 2 deletions

View file

@ -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;
}