fixed some dumb bugs; more porting

This commit is contained in:
Chris Forbes
2010-01-11 18:57:49 +13:00
parent b94e5441dc
commit 21bf3cd0e1
7 changed files with 167 additions and 9 deletions

View File

@@ -17,13 +17,14 @@ namespace OpenRa.Game.Traits
{
var unit = self.traits.Get<Unit>();
var attack = self.traits.WithInterface<AttackBase>().First();
var attackInfo = self.Info.Traits.WithInterface<AttackBaseInfo>().First();
var muzzleFlash = new Animation(self.LegacyInfo.Name);
var muzzleFlash = new Animation(GetImage(self));
muzzleFlash.PlayFetchIndex("muzzle",
() => (Util.QuantizeFacing(unit.Facing, 8)) * 6 + (int)(attack.primaryRecoil * 5.9f));
anims.Add( "muzzle", new AnimationWithOffset(
muzzleFlash,
() => self.LegacyInfo.PrimaryOffset.AbsOffset(),
() => attackInfo.PrimaryOffset.AbsOffset(),
() => attack.primaryRecoil <= 0 ) );
}
}