Merge pull request #9462 from abcdefg30/sovietfix
Fix a crash in the soviet04 missions
This commit is contained in:
@@ -37,12 +37,19 @@ 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)
|
||||||
|
|
||||||
|
Trigger.OnAllKilled(Village, function()
|
||||||
|
if VillageCamera then
|
||||||
|
VillageCamera.Destroy()
|
||||||
|
end
|
||||||
|
AllVillagersDead = true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAnyKilled(Civs, function()
|
Trigger.OnAnyKilled(Civs, function()
|
||||||
|
|||||||
@@ -39,12 +39,19 @@ 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)
|
||||||
|
|
||||||
|
Trigger.OnAllKilled(Village, function()
|
||||||
|
if VillageCamera then
|
||||||
|
VillageCamera.Destroy()
|
||||||
|
end
|
||||||
|
AllVillagersDead = true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAnyKilled(Civs, function()
|
Trigger.OnAnyKilled(Civs, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user