Zone extents derived from zone

This commit is contained in:
2023-10-09 06:04:37 -04:00
parent 73b6854266
commit a17b9fdd13
4 changed files with 12 additions and 42 deletions
+1 -9
View File
@@ -199,15 +199,7 @@ public class Zone extends AbstractGameObject {
// Set initial bounds object
this.bounds = Bounds.borrow();
Vector2f zoneSize = ZoneManager._zone_size_data.get(this.template);
// Default to player zone size on error? Maybe log this
if (zoneSize != null)
this.bounds.setBounds(new Vector2f(this.absX, this.absZ), zoneSize, 0.0f);
else
bounds.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.halfExtents, Enum.CityBoundsType.ZONE.halfExtents), 0.0f);
this.bounds.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(this.major_radius, this.minor_radius), 0.0f);
}