Browse Source

bugfix in array loading

feature-workorder
MagicBot 1 year ago
parent
commit
dd5fc323ef
  1. 12
      src/engine/InterestManagement/HeightMap.java

12
src/engine/InterestManagement/HeightMap.java

@ -137,10 +137,10 @@ public class HeightMap {
this.bucketWidthX = halfExtentsX; this.bucketWidthX = halfExtentsX;
this.bucketWidthY = halfExtentsY; this.bucketWidthY = halfExtentsY;
this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1]; this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY];
for (int y = 0; y <= this.fullExtentsY; y++) { for (int y = 0; y < this.fullExtentsY; y++) {
for (int x = 0; x <= this.fullExtentsX; x++) { for (int x = 0; x < this.fullExtentsX; x++) {
pixelColorValues[x][y] = 0; pixelColorValues[x][y] = 0;
} }
} }
@ -172,10 +172,10 @@ public class HeightMap {
this.bucketWidthX = halfExtentsX; this.bucketWidthX = halfExtentsX;
this.bucketWidthY = halfExtentsY; this.bucketWidthY = halfExtentsY;
this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1]; this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY];
for (int y = 0; y <= this.fullExtentsY; y++) { for (int y = 0; y < this.fullExtentsY; y++) {
for (int x = 0; x <= this.fullExtentsX; x++) { for (int x = 0; x < this.fullExtentsX; x++) {
pixelColorValues[x][y] = 0; pixelColorValues[x][y] = 0;
} }
} }

Loading…
Cancel
Save