|
|
@ -35,14 +35,10 @@ public class Terrain { |
|
|
|
this.heightmap = this.zone.terrain_image; |
|
|
|
this.heightmap = this.zone.terrain_image; |
|
|
|
|
|
|
|
|
|
|
|
// Configure PLANAR zones to use the same 16x16 pixel image
|
|
|
|
// Configure PLANAR zones to use the same 16x16 pixel image
|
|
|
|
// that all similar terrains share. (See JSON) Guild zones
|
|
|
|
// that all similar terrains share. (See JSON)
|
|
|
|
// use an inverted clone of this heightmap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.zone.terrain_type.equals("PLANAR")) |
|
|
|
if (this.zone.terrain_type.equals("PLANAR")) |
|
|
|
if (this.zone.guild_zone) |
|
|
|
|
|
|
|
this.heightmap = 1006301; // all 255
|
|
|
|
this.heightmap = 1006301; // all 255
|
|
|
|
else |
|
|
|
|
|
|
|
this.heightmap = 1006300; // all 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Load pixel data for this terrain from cache
|
|
|
|
// Load pixel data for this terrain from cache
|
|
|
|
|
|
|
|
|
|
|
@ -170,6 +166,11 @@ public class Terrain { |
|
|
|
|
|
|
|
|
|
|
|
float interpolatedHeight; |
|
|
|
float interpolatedHeight; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Early exit for guild zones
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.zone.guild_zone) |
|
|
|
|
|
|
|
return 5.0f; |
|
|
|
|
|
|
|
|
|
|
|
Vector2f terrain_cell = getTerrainCell(terrain_loc); |
|
|
|
Vector2f terrain_cell = getTerrainCell(terrain_loc); |
|
|
|
|
|
|
|
|
|
|
|
int pixel_x = (int) Math.floor(terrain_cell.x); |
|
|
|
int pixel_x = (int) Math.floor(terrain_cell.x); |
|
|
|