Convert mission scripts to world coords.

This commit is contained in:
Paul Chote
2013-07-20 13:08:08 +12:00
parent 1dfc4837d4
commit 6201d7bfe2
11 changed files with 44 additions and 43 deletions

View File

@@ -121,7 +121,7 @@ namespace OpenRA.Mods.RA.Missions
MissionUtils.CapOre(ussr);
if (!hospitalEvacuated && !hospital.IsDead() && MissionUtils.AreaSecuredWithUnits(world, greece, hospital.CenterLocation, 5))
if (!hospitalEvacuated && !hospital.IsDead() && MissionUtils.AreaSecuredWithUnits(world, greece, hospital.CenterPosition, WRange.FromCells(5)))
{
EvacuateCivilians();
hospitalEvacuated = true;
@@ -129,7 +129,7 @@ namespace OpenRA.Mods.RA.Missions
if (baseTransferredTick == -1)
{
var actorsInBase = world.FindUnits(alliedBaseTopLeft.CenterLocation, alliedBaseBottomRight.CenterLocation).Where(a => a != a.Owner.PlayerActor);
var actorsInBase = world.FindUnits(alliedBaseTopLeft.Location, alliedBaseBottomRight.Location).Where(a => a != a.Owner.PlayerActor);
if (actorsInBase.Any(a => a.Owner == greece))
{
SetupAlliedBase(actorsInBase);
@@ -184,7 +184,7 @@ namespace OpenRA.Mods.RA.Missions
MissionFailed("Dr. Demitri was killed.");
}
else if (MissionUtils.AreaSecuredWithUnits(world, greece, demitriTriggerAreaCenter.CenterLocation, 3))
else if (MissionUtils.AreaSecuredWithUnits(world, greece, demitriTriggerAreaCenter.CenterPosition, WRange.FromCells(3)))
{
demitri = world.CreateActor("demitri", greece, demitriChurchSpawnPoint.Location, null);
demitri.QueueActivity(new Move.Move(demitriTriggerAreaCenter.Location, 0));