diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 5fa87ddb6..d1b9cf371 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -200,10 +200,8 @@ function SPAWNSTATIC:ReSpawn(countryid) if StaticTemplate then - local CountryID = countryid or self.CountryID - local CountryName = _DATABASE.COUNTRY_NAME[CountryID] + --local CountryID = countryid or (self.CountryID or CountryID) - StaticTemplate.units = nil StaticTemplate.route = nil StaticTemplate.groupId = nil diff --git a/Moose Development/Moose/Wrapper/Static.lua b/Moose Development/Moose/Wrapper/Static.lua index fd20f3328..e624dc021 100644 --- a/Moose Development/Moose/Wrapper/Static.lua +++ b/Moose Development/Moose/Wrapper/Static.lua @@ -197,9 +197,9 @@ end -- @param DCS#country.id countryid The country ID used for spawning the new static. function STATIC:ReSpawn(countryid) - local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName ) + local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName, countryid ) - SpawnStatic:ReSpawn(countryid) + SpawnStatic:ReSpawn() end