diff --git a/src/engine/InterestManagement/Terrain.java b/src/engine/InterestManagement/Terrain.java index 4db671ab..6b962fda 100644 --- a/src/engine/InterestManagement/Terrain.java +++ b/src/engine/InterestManagement/Terrain.java @@ -62,11 +62,22 @@ public class Terrain { // the blending area between child and parent terrains when // they are stitched together. - Vector2f major_blend = new Vector2f(this.zone.template.max_blend / this.zone.major_radius, - this.zone.template.min_blend / this.zone.major_radius); + float max_blend = this.zone.template.max_blend; + float min_blend = this.zone.template.min_blend; - Vector2f minor_blend = new Vector2f(this.zone.template.max_blend / this.zone.minor_radius, - this.zone.template.min_blend / this.zone.minor_radius); + // Zones with a zero blend inherit from their parent terrain + + if (this.zone.template.max_blend == 0) { + Zone parentZone = this.getNextZoneWithTerrain(this.zone); + max_blend = parentZone.template.max_blend; + min_blend = parentZone.template.min_blend; + } + + Vector2f major_blend = new Vector2f(max_blend / this.zone.major_radius, + min_blend / this.zone.major_radius); + + Vector2f minor_blend = new Vector2f(max_blend / this.zone.minor_radius, + min_blend / this.zone.minor_radius); if (major_blend.y > 0.4f) blend_ratio.x = major_blend.y;