migrating most things to use the Target struct rather than Actor directly.
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user