diff --git a/src/engine/InterestManagement/Terrain.java b/src/engine/InterestManagement/Terrain.java index 3e36c68b..0e8a6e1c 100644 --- a/src/engine/InterestManagement/Terrain.java +++ b/src/engine/InterestManagement/Terrain.java @@ -145,7 +145,7 @@ public class Terrain { Vector2f terrain_cell = getTerrainCell(terrainLoc); int pixel_x = (int) Math.floor(terrain_cell.x); - int pixel_t = (int) Math.floor(terrain_cell.y); + int pixel_y = (int) Math.floor(terrain_cell.y); Vector2f pixel_offset = new Vector2f(terrain_cell.x % 1, terrain_cell.y % 1); @@ -156,10 +156,10 @@ public class Terrain { float bottomLeftHeight; float bottomRightHeight; - topLeftHeight = terrain_pixel_data[pixel_x][pixel_t]; - topRightHeight = terrain_pixel_data[pixel_x + 1][pixel_t]; - bottomLeftHeight = terrain_pixel_data[pixel_x][pixel_t + 1]; - bottomRightHeight = terrain_pixel_data[pixel_x + 1][pixel_t + 1]; + topLeftHeight = terrain_pixel_data[pixel_x][pixel_y]; + topRightHeight = terrain_pixel_data[pixel_x + 1][pixel_y]; + bottomLeftHeight = terrain_pixel_data[pixel_x][pixel_y + 1]; + bottomRightHeight = terrain_pixel_data[pixel_x + 1][pixel_y + 1]; // Interpolate between the 4 vertices