Merge pull request #9462 from abcdefg30/sovietfix

Fix a crash in the soviet04 missions
This commit is contained in:
Oliver Brakmann
2015-10-06 20:27:16 +02:00
2 changed files with 22 additions and 8 deletions

View File

@@ -39,14 +39,21 @@ RunInitialActivities = function()
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
if actor.Owner == player then
local camera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
Trigger.RemoveFootprintTrigger(id)
Trigger.OnAllKilled(Village, function()
camera.Destroy()
end)
if not AllVillagersDead then
VillageCamera = Actor.Create("camera", true, { Owner = player, Location = VillagePoint.Location })
end
end
end)
Trigger.OnAllKilled(Village, function()
if VillageCamera then
VillageCamera.Destroy()
end
AllVillagersDead = true
end)
Trigger.OnAnyKilled(Civs, function()
Trigger.ClearAll(civ1)
Trigger.ClearAll(civ2)