Update to blend logic.

This commit is contained in:
2023-09-17 14:00:00 -04:00
parent df45e00fbd
commit 40c27eef79
3 changed files with 17 additions and 43 deletions
+1 -7
View File
@@ -60,8 +60,6 @@ public class Zone extends AbstractGameObject {
private float seaLevel = 0f;
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
public static long lastRespawn = 0;
public Bounds minBlend;
public Bounds maxBlend;
/**
@@ -191,14 +189,10 @@ public class Zone extends AbstractGameObject {
// Set heightmap blending bounds
if (heightMap == null) {
this.minBlend = this.getBounds();
this.maxBlend = this.getBounds();
} else {
this.minBlend = Bounds.borrow();
this.maxBlend = Bounds.borrow();
this.minBlend.setBounds(new Vector2f(this.absX, this.absZ), this.getBounds().getHalfExtents().subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f);
this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), this.minBlend.getHalfExtents().subtract(heightMap.zone_maxBlend, heightMap.zone_maxBlend), 0.0f);
this.maxBlend.setBounds(new Vector2f(this.absX, this.absZ), this.getBounds().getHalfExtents().subtract(heightMap.zone_minBlend, heightMap.zone_minBlend), 0.0f);
}
}