Merge pull request #9462 from abcdefg30/sovietfix
Fix a crash in the soviet04 missions
This commit is contained in:
@@ -37,14 +37,21 @@ RunInitialActivities = function()
|
|||||||
|
|
||||||
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
|
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
|
||||||
if actor.Owner == player then
|
if actor.Owner == player then
|
||||||
local camera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
|
|
||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
Trigger.OnAllKilled(Village, function()
|
|
||||||
camera.Destroy()
|
if not AllVillagersDead then
|
||||||
end)
|
VillageCamera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Trigger.OnAllKilled(Village, function()
|
||||||
|
if VillageCamera then
|
||||||
|
VillageCamera.Destroy()
|
||||||
|
end
|
||||||
|
AllVillagersDead = true
|
||||||
|
end)
|
||||||
|
|
||||||
Trigger.OnAnyKilled(Civs, function()
|
Trigger.OnAnyKilled(Civs, function()
|
||||||
Trigger.ClearAll(civ1)
|
Trigger.ClearAll(civ1)
|
||||||
Trigger.ClearAll(civ2)
|
Trigger.ClearAll(civ2)
|
||||||
|
|||||||
@@ -39,14 +39,21 @@ RunInitialActivities = function()
|
|||||||
|
|
||||||
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
|
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
|
||||||
if actor.Owner == player then
|
if actor.Owner == player then
|
||||||
local camera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
|
|
||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
Trigger.OnAllKilled(Village, function()
|
|
||||||
camera.Destroy()
|
if not AllVillagersDead then
|
||||||
end)
|
VillageCamera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Trigger.OnAllKilled(Village, function()
|
||||||
|
if VillageCamera then
|
||||||
|
VillageCamera.Destroy()
|
||||||
|
end
|
||||||
|
AllVillagersDead = true
|
||||||
|
end)
|
||||||
|
|
||||||
Trigger.OnAnyKilled(Civs, function()
|
Trigger.OnAnyKilled(Civs, function()
|
||||||
Trigger.ClearAll(civ1)
|
Trigger.ClearAll(civ1)
|
||||||
Trigger.ClearAll(civ2)
|
Trigger.ClearAll(civ2)
|
||||||
|
|||||||
Reference in New Issue
Block a user