Browse Source

Correction to blend configuration.

combat-2
MagicBot 1 year ago
parent
commit
c38103068e
  1. 9
      src/engine/objects/Zone.java

9
src/engine/objects/Zone.java

@ -190,8 +190,13 @@ public class Zone extends AbstractGameObject {
// Set heightmap blending bounds // Set heightmap blending bounds
if (heightMap != null) { this.minBlend = Bounds.borrow();
this.minBlend = Bounds.borrow(); this.maxBlend = Bounds.borrow();
if (heightMap == null) {
this.minBlend = this.getBounds();
this.maxBlend = this.getBounds();
} else {
this.minBlend.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents).subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f); this.minBlend.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents).subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f);
this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents).subtract(heightMap.zone_maxBlend, heightMap.zone_maxBlend), 0.0f); this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents).subtract(heightMap.zone_maxBlend, heightMap.zone_maxBlend), 0.0f);
} }

Loading…
Cancel
Save