|
|
@ -60,7 +60,7 @@ public class Terrain { |
|
|
|
this.cell_count.y = this.image_size.y; |
|
|
|
this.cell_count.y = this.image_size.y; |
|
|
|
|
|
|
|
|
|
|
|
this.cell_size.x = terrain_size.x / this.cell_count.x; |
|
|
|
this.cell_size.x = terrain_size.x / this.cell_count.x; |
|
|
|
this.cell_size.y = terrain_size.y / this.cell_count.x; // Bug mirrors exe
|
|
|
|
this.cell_size.y = terrain_size.y / this.cell_count.y; |
|
|
|
|
|
|
|
|
|
|
|
// Blending configuration. These ratios are used to calculate
|
|
|
|
// Blending configuration. These ratios are used to calculate
|
|
|
|
// the blending area between child and parent terrains when
|
|
|
|
// the blending area between child and parent terrains when
|
|
|
@ -158,9 +158,9 @@ public class Terrain { |
|
|
|
|
|
|
|
|
|
|
|
public Vector2f getTerrainCell(Vector2f terrain_loc) { |
|
|
|
public Vector2f getTerrainCell(Vector2f terrain_loc) { |
|
|
|
|
|
|
|
|
|
|
|
// Calculate terrain cell with offset
|
|
|
|
// Calculate terrain cell with offset. Bug mirrors the exe
|
|
|
|
|
|
|
|
|
|
|
|
Vector2f terrain_cell = new Vector2f(terrain_loc.x / this.cell_size.x, terrain_loc.y / this.cell_size.y); |
|
|
|
Vector2f terrain_cell = new Vector2f(terrain_loc.x / this.cell_size.x, terrain_loc.y / this.cell_size.x); |
|
|
|
|
|
|
|
|
|
|
|
// Clamp values when standing directly on pole
|
|
|
|
// Clamp values when standing directly on pole
|
|
|
|
|
|
|
|
|
|
|
|