fixed some dumb bugs; more porting
This commit is contained in:
@@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user