migrating most things to use the Target struct rather than Actor directly.

This commit is contained in:
Chris Forbes
2010-07-05 18:25:10 +12:00
parent 88b705c8ef
commit 5c61c9d3a9
14 changed files with 57 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA
if( self.traits.Contains<Building>() && !buildComplete )
return false;
if (target == null) return false;
if (!target.IsValid) return false;
var turreted = self.traits.Get<Turreted>();
turreted.desiredFacing = Util.GetFacing( target.CenterLocation - self.CenterLocation, turreted.turretFacing );
if( turreted.desiredFacing != turreted.turretFacing )
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.RA
self.QueueActivity( new Follow( order.TargetActor,
Math.Max( 0, (int)weapon.Range - RangeTolerance ) ) );
target = order.TargetActor;
target = Target.FromActor(order.TargetActor);
}