|
|
|
@ -327,15 +327,15 @@ public class HeightMap {
@@ -327,15 +327,15 @@ public class HeightMap {
|
|
|
|
|
|
|
|
|
|
// Clamp values.
|
|
|
|
|
|
|
|
|
|
if (zoneLoc.x >= this.fullExtentsX) |
|
|
|
|
Logger.error("Outside of zone"); |
|
|
|
|
|
|
|
|
|
if (zoneLoc.y >= this.fullExtentsY) |
|
|
|
|
Logger.error("Outside of zone"); |
|
|
|
|
|
|
|
|
|
float xBucket = zoneLoc.x / this.bucketWidthX; |
|
|
|
|
float yBucket = zoneLoc.y / this.bucketWidthY; |
|
|
|
|
|
|
|
|
|
if (xBucket >= this.bucketCountX) |
|
|
|
|
xBucket = this.bucketCountX - 1; |
|
|
|
|
|
|
|
|
|
if (yBucket >= this.bucketCountY) |
|
|
|
|
yBucket = this.bucketCountY - 1; |
|
|
|
|
|
|
|
|
|
return new Vector2f(xBucket, yBucket); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|