forked from MagicBane/Server
Zones with zero blend inherit from parent
This commit is contained in:
@@ -62,11 +62,22 @@ public class Terrain {
|
|||||||
// the blending area between child and parent terrains when
|
// the blending area between child and parent terrains when
|
||||||
// they are stitched together.
|
// they are stitched together.
|
||||||
|
|
||||||
Vector2f major_blend = new Vector2f(this.zone.template.max_blend / this.zone.major_radius,
|
float max_blend = this.zone.template.max_blend;
|
||||||
this.zone.template.min_blend / this.zone.major_radius);
|
float min_blend = this.zone.template.min_blend;
|
||||||
|
|
||||||
Vector2f minor_blend = new Vector2f(this.zone.template.max_blend / this.zone.minor_radius,
|
// Zones with a zero blend inherit from their parent terrain
|
||||||
this.zone.template.min_blend / this.zone.minor_radius);
|
|
||||||
|
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)
|
if (major_blend.y > 0.4f)
|
||||||
blend_ratio.x = major_blend.y;
|
blend_ratio.x = major_blend.y;
|
||||||
|
|||||||
Reference in New Issue
Block a user