Fail Allies01/Allies02 if the extraction helicopter is destroyed

This commit is contained in:
Scott_NZ
2012-08-14 19:45:32 +12:00
parent 6c79b454bf
commit c41fcb15b0
2 changed files with 24 additions and 13 deletions

View File

@@ -156,19 +156,26 @@ namespace OpenRA.Mods.RA.Missions
FlyEinsteinFromExtractionLZ();
}
}
if (einsteinChinook != null && !einsteinChinook.IsDead() && !world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
if (einsteinChinook != null)
{
MissionAccomplished("Einstein was rescued.");
}
if (einstein.Destroyed)
{
MissionFailed("Einstein was killed.");
if (einsteinChinook.Destroyed)
{
MissionFailed("The extraction helicopter was destroyed.");
}
else if (!world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
{
MissionAccomplished("Einstein was rescued.");
}
}
}
if (tanya.Destroyed)
{
MissionFailed("Tanya was killed.");
}
else if (einstein != null && einstein.Destroyed)
{
MissionFailed("Einstein was killed.");
}
ManageSovietOre();
}