wtf removed

This commit is contained in:
Chris Forbes
2009-12-27 23:15:53 +13:00
parent 6ff4ea3717
commit 47f4815205
2 changed files with 5 additions and 4 deletions

View File

@@ -19,10 +19,9 @@ namespace OpenRa.Game.Traits.Activities
if (Target == null || Target.IsDead)
return NextActivity;
var canMove = !self.traits.Contains<Building>();
var inRange = ( Target.Location - self.Location ).LengthSquared < Range * Range;
if( canMove && !inRange )
if( !inRange )
return new Move( Target, Range ) { NextActivity = this };
return null;

View File

@@ -37,8 +37,10 @@ namespace OpenRa.Game.Traits
/* todo: choose the appropriate weapon, when only one works against this target */
var weapon = order.Subject.Info.Primary ?? order.Subject.Info.Secondary;
self.QueueActivity( new Traits.Activities.Follow( order.TargetActor,
Math.Max( 0, (int)Rules.WeaponInfo[ weapon ].Range - RangeTolerance ) ) );
if (self.traits.Contains<Mobile>())
self.QueueActivity( new Traits.Activities.Follow( order.TargetActor,
Math.Max( 0, (int)Rules.WeaponInfo[ weapon ].Range - RangeTolerance ) ) );
self.traits.Get<AttackTurreted>().target = order.TargetActor;
}