renamed Info to LegacyInfo, marked Obsolete. added NewUnitInfo ref as Info.

This commit is contained in:
Chris Forbes
2010-01-10 18:28:24 +13:00
parent 74a2ed9624
commit 99a61ca8d9
52 changed files with 142 additions and 137 deletions

View File

@@ -82,14 +82,14 @@ namespace OpenRa.Game.Traits
static float2 GetRecoil(Actor self, float recoil)
{
if (self.Info.Recoil == 0) return float2.Zero;
if (self.LegacyInfo.Recoil == 0) return float2.Zero;
var rut = self.traits.WithInterface<RenderUnitTurreted>().FirstOrDefault();
if (rut == null) return float2.Zero;
var facing = self.traits.Get<Turreted>().turretFacing;
var quantizedFacing = QuantizeFacing(facing, rut.anim.CurrentSequence.Length) * (256 / rut.anim.CurrentSequence.Length);
return RotateVectorByFacing(new float2(0, recoil * self.Info.Recoil), quantizedFacing, .7f);
return RotateVectorByFacing(new float2(0, recoil * self.LegacyInfo.Recoil), quantizedFacing, .7f);
}
public static float2 CenterOfCell(int2 loc)
@@ -127,7 +127,7 @@ namespace OpenRa.Game.Traits
public static float GetEffectiveSpeed(Actor self)
{
var mi = self.Info as LegacyMobileInfo;
var mi = self.LegacyInfo as LegacyMobileInfo;
if (mi == null) return 0f;
var modifier = self.traits