fix for infinite hex boards

This commit is contained in:
Gavin McDonald
2019-01-31 22:09:07 -05:00
parent 1557bbff4a
commit c0a2e3ff2d
2 changed files with 6 additions and 0 deletions

View File

@@ -212,6 +212,9 @@ export default class CartographerFlatXYZ extends Cartographer {
&& (!this.height || (y <= (Math.floor(x / 2) * -1) && (-y - Math.floor(x / 2)) < this.height)); && (!this.height || (y <= (Math.floor(x / 2) * -1) && (-y - Math.floor(x / 2)) < this.height));
} }
} }
else {
return true;
}
} }
enforceBoundries ({tilePoint, pixelPoint}) { enforceBoundries ({tilePoint, pixelPoint}) {

View File

@@ -214,6 +214,9 @@ export default class CartographerPointyXYZ extends Cartographer {
&& (!this.height || (hex.y <= (Math.floor(hex.x / 2) * -1) && (-hex.y - Math.floor(hex.x / 2)) < this.height)); && (!this.height || (hex.y <= (Math.floor(hex.x / 2) * -1) && (-hex.y - Math.floor(hex.x / 2)) < this.height));
} }
} }
else {
return true;
}
} }
enforceBoundries ({tilePoint, pixelPoint}) { enforceBoundries ({tilePoint, pixelPoint}) {