push turret facing check down to turret

This commit is contained in:
Chris Forbes
2011-08-21 21:32:39 +12:00
parent 6a092dbfda
commit c11b7041f4
3 changed files with 8 additions and 6 deletions

View File

@@ -70,9 +70,7 @@ namespace OpenRA.Mods.RA
return false;
}
Turret.desiredFacing = Util.GetFacing( target.CenterLocation - self.CenterLocation, Turret.turretFacing );
if( Turret.desiredFacing != Turret.turretFacing )
return false;
if (!Turret.FaceTarget(self,target)) return false;
return true;
}

View File

@@ -39,9 +39,7 @@ namespace OpenRA.Mods.RA
return false;
if (!target.IsValid) return false;
turret.desiredFacing = Util.GetFacing( target.CenterLocation - self.CenterLocation, turret.turretFacing );
if( turret.desiredFacing != turret.turretFacing )
return false;
if (!turret.FaceTarget(self, target)) return false;
return base.CanAttack( self, target );
}