mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Trying a workaround for a new DCS crash when ReSpawning
Now i destroy the group first before respawning...
This commit is contained in:
parent
01c85670ec
commit
ab4f4e75d1
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user