Trying a workaround for a new DCS crash when ReSpawning

Now i destroy the group first before respawning...
This commit is contained in:
FlightControl
2016-04-23 13:26:33 +02:00
parent 01c85670ec
commit ab4f4e75d1
4 changed files with 15 additions and 15 deletions

View File

@@ -11511,13 +11511,13 @@ function SPAWN:ReSpawn( SpawnIndex )
end
-- TODO: This logic makes DCS crash and i don't know why (yet).
-- local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
-- if SpawnGroup then
-- local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
-- if SpawnDCSGroup then
-- SpawnGroup:Destroy()
-- end
-- end
local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
if SpawnGroup then
local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
if SpawnDCSGroup then
SpawnGroup:Destroy()
end
end
return self:SpawnWithIndex( SpawnIndex )
end