From dd01fd168879ecfe1894e47a8e1c90005be87d43 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 9 Oct 2023 09:22:41 -0400 Subject: [PATCH] Proper setting of maxpy --- src/engine/InterestManagement/Terrain.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/InterestManagement/Terrain.java b/src/engine/InterestManagement/Terrain.java index b9e4570c..5ba97c6b 100644 --- a/src/engine/InterestManagement/Terrain.java +++ b/src/engine/InterestManagement/Terrain.java @@ -196,8 +196,8 @@ public class Terrain { else xval = Math.min(maxp, 0.4f); + float maxpy = this.zone.max_blend / this.zone.major_radius; float minpy = this.zone.min_blend / this.zone.minor_radius; - float maxpy = this.zone.max_blend / this.zone.minor_radius; float yval; @@ -208,9 +208,9 @@ public class Terrain { float value; - if (normalizedLoc.x <= 1 - xval || normalizedLoc.x <= normalizedLoc.y) { + if (normalizedLoc.x <= 1 - xval || normalizedLoc.y <= 1 - yval) { - if (normalizedLoc.x < 1 - yval) + if (normalizedLoc.x < 1 - xval) return 1; value = (normalizedLoc.y - (1 - yval)) / yval;