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