Kill some spurious references to Unit

This commit is contained in:
Paul Chote
2010-08-01 00:33:53 +12:00
parent d29e3f3f0e
commit 45e54e1ca8
2 changed files with 1 additions and 4 deletions

View File

@@ -255,7 +255,6 @@ namespace OpenRA.Traits.Activities
void UpdateCenterLocation( Actor self, Mobile mobile ) void UpdateCenterLocation( Actor self, Mobile mobile )
{ {
var unit = self.traits.Get<Unit>();
var frac = (float)moveFraction / moveFractionTotal; var frac = (float)moveFraction / moveFractionTotal;
self.CenterLocation = float2.Lerp( from, to, frac ); self.CenterLocation = float2.Lerp( from, to, frac );
@@ -278,8 +277,6 @@ namespace OpenRA.Traits.Activities
protected override MovePart OnComplete( Actor self, Mobile mobile, Move parent ) protected override MovePart OnComplete( Actor self, Mobile mobile, Move parent )
{ {
var unit = self.traits.Get<Unit>();
var nextCell = parent.PopPath( self, mobile ); var nextCell = parent.PopPath( self, mobile );
if( nextCell != null ) if( nextCell != null )
{ {

View File

@@ -68,7 +68,7 @@ namespace OpenRA.Mods.RA
} }
self.CancelActivity(); self.CancelActivity();
if (self.traits.Contains<Unit>()) if (self.traits.Contains<IFacing>())
self.QueueActivity(new Turn(Info.Facing)); self.QueueActivity(new Turn(Info.Facing));
self.QueueActivity(new Transform(self, Info.IntoActor, Info.Offset, Info.Facing, Info.TransformSounds)); self.QueueActivity(new Transform(self, Info.IntoActor, Info.Offset, Info.Facing, Info.TransformSounds));