forked from MagicBane/Server
Class cleanup and comments
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user