@adatechnology/game-floorplan 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -640,7 +640,7 @@ var GameFloorplan = (() => {
640
640
  const nz = Math.ceil((v1 - v0) / gs);
641
641
  const insideCells = new Uint8Array(nx * nz);
642
642
  const insets = room.outdoor ? usableParts(room, 0.08) : room.parts;
643
- const bodies = room.outdoor ? null : wallBodies(plan, room.floor);
643
+ const bodies = room.outdoor ? null : wallBodies(plan, room.floor).filter((r) => r[0] - radius <= u1 && r[2] + radius >= u0 && r[1] - radius <= v1 && r[3] + radius >= v0);
644
644
  const tooClose = (u, v) => bodies.some((r) => {
645
645
  const dx = Math.max(r[0] - u, 0, u - r[2]);
646
646
  const dz = Math.max(r[1] - v, 0, v - r[3]);