From 17640412724503612a72c9fecbc11cd6104e7abd Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 11 Oct 2023 11:34:37 -0400 Subject: [PATCH] Class cleanup and comments --- src/engine/InterestManagement/Terrain.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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