|
|
@ -35,15 +35,15 @@ public class Terrain { |
|
|
|
this.zone = zone; |
|
|
|
this.zone = zone; |
|
|
|
this.heightmap = this.zone.terrain_image; |
|
|
|
this.heightmap = this.zone.terrain_image; |
|
|
|
|
|
|
|
|
|
|
|
// Configure PLANAR zones to use the same
|
|
|
|
// Configure PLANAR zones to use the same 16x16 pixel image
|
|
|
|
// 16x16 pixel image that all other flat
|
|
|
|
// that all similar terrains share. (See JSON) Guild zones
|
|
|
|
// terrains share.
|
|
|
|
// 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) |
|
|
|
if (this.zone.guild_zone) |
|
|
|
this.heightmap = 1006301; |
|
|
|
this.heightmap = 1006301; // all 255
|
|
|
|
else |
|
|
|
else |
|
|
|
this.heightmap = 1006300; |
|
|
|
this.heightmap = 1006300; // all 0
|
|
|
|
|
|
|
|
|
|
|
|
// Load pixel data for this terrain from cache
|
|
|
|
// Load pixel data for this terrain from cache
|
|
|
|
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ public class Terrain { |
|
|
|
// Interpolate height for this position in terrain
|
|
|
|
// Interpolate height for this position in terrain
|
|
|
|
|
|
|
|
|
|
|
|
float interpolatedChildHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc); |
|
|
|
float interpolatedChildHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc); |
|
|
|
interpolatedChildHeight += terrainZone.worldAltitude; |
|
|
|
interpolatedChildHeight += terrainZone.global_height; |
|
|
|
|
|
|
|
|
|
|
|
return interpolatedChildHeight; |
|
|
|
return interpolatedChildHeight; |
|
|
|
} |
|
|
|
} |
|
|
|