From cb4a12c5ba53b649fcf656954992917193795dfd Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 23 Aug 2024 12:41:44 +0200 Subject: [PATCH] xx --- Moose Development/Moose/Core/SpawnStatic.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 965f86f00..5021ac52a 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -472,7 +472,11 @@ end function SPAWNSTATIC:_SpawnStatic(Template, CountryID) Template=Template or {} - + + if not Template.alt then + Template.alt = land.getHeight( {x = Template.x, y = Template.y} ) + end + local CountryID=CountryID or self.CountryID if self.InitStaticType then @@ -486,7 +490,7 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID) if self.InitStaticCoordinate then Template.x = self.InitStaticCoordinate.x Template.y = self.InitStaticCoordinate.z - Template.alt = self.InitStaticCoordinate.y + Template.alt = self.InitStaticCoordinate.y or land.getHeight( {x = Template.x, y = Template.z} ) end if self.InitStaticHeading then