[FIXED] SPAWNSTATIC not registering script spawned static templates therefore ReSpawn is not working.

This commit is contained in:
smiki 2025-10-05 16:57:33 +02:00
parent 935b52c489
commit 6e45ee558e

View File

@ -633,7 +633,8 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
if self.StaticCopyFrom ~= nil then if self.StaticCopyFrom ~= nil then
mystatic.StaticCopyFrom = self.StaticCopyFrom mystatic.StaticCopyFrom = self.StaticCopyFrom
if not _DATABASE.Templates.Statics[Template.name] then end
local TemplateGroup={} local TemplateGroup={}
TemplateGroup.units={} TemplateGroup.units={}
TemplateGroup.units[1]=Template TemplateGroup.units[1]=Template
@ -641,8 +642,6 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
TemplateGroup.y=Template.y TemplateGroup.y=Template.y
TemplateGroup.name=Template.name TemplateGroup.name=Template.name
_DATABASE:_RegisterStaticTemplate( TemplateGroup, self.CoalitionID, self.CategoryID, CountryID ) _DATABASE:_RegisterStaticTemplate( TemplateGroup, self.CoalitionID, self.CategoryID, CountryID )
end
end
return mystatic return mystatic
end end