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

View File

@ -418,13 +418,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

View File

@ -77,7 +77,7 @@ Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limit
-- Tests the CleanUp functionality.
-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground.
-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn.
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 180 ):SpawnScheduled( 10, 0 )
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 60 ):SpawnScheduled( 10, 0 )
Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )
-- Maykop