Merge pull request #2404 from shaji-Dev/master

[FIXED] SPAWNSTATIC not registering script spawned static templates therefore ReSpawn is not working.
This commit is contained in:
Thomas 2025-10-05 18:04:09 +02:00 committed by GitHub
commit 3df79aedb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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