Fix potentially bogus usages of OnAllRemovedFromWorld
This commit is contained in:
@@ -189,8 +189,8 @@ InitTriggers = function()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Trigger.OnAllRemovedFromWorld(FirstUSSRBase, function()
|
||||
if baseCamera then
|
||||
Trigger.OnAllKilledOrCaptured(FirstUSSRBase, function()
|
||||
if baseCamera and baseCamera.IsInWorld then
|
||||
baseCamera.Destroy()
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -252,8 +252,8 @@ InitTriggers = function()
|
||||
AlertFirstBase()
|
||||
end)
|
||||
end)
|
||||
Trigger.OnAllRemovedFromWorld(FirstUSSRBase, function()
|
||||
if baseCamera then
|
||||
Trigger.OnAllKilledOrCaptured(FirstUSSRBase, function()
|
||||
if baseCamera and baseCamera.IsInWorld then
|
||||
baseCamera.Destroy()
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -217,6 +217,6 @@ WorldLoaded = function()
|
||||
Trigger.AfterDelay(ActivateAIDelay, ActivateAI)
|
||||
Trigger.AfterDelay(StartTimerDelay, StartTimerFunction)
|
||||
|
||||
Trigger.OnAllRemovedFromWorld(DestroySubPensTriggerActivator, DestroySubPensCompleted)
|
||||
Trigger.OnAllKilledOrCaptured(DestroySubPensTriggerActivator, DestroySubPensCompleted)
|
||||
Trigger.OnAllRemovedFromWorld(ClearSubActivityTriggerActivator, ClearSubActivityCompleted)
|
||||
end
|
||||
|
||||
@@ -286,8 +286,7 @@ SovietBaseMaintenanceSetup = function()
|
||||
and a.HasProperty("StartBuildingRepairs") and a.HasProperty("Sell")
|
||||
end)
|
||||
|
||||
-- This includes killed, captured (actor is temporarily removed) and sold.
|
||||
Trigger.OnAllRemovedFromWorld(sovietbuildings, function()
|
||||
Trigger.OnAllKilledOrCaptured(sovietbuildings, function()
|
||||
Utils.Do(humans, function(player)
|
||||
player.MarkCompletedObjective(destroyBase)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user