Remove redundant IBodyOrientation[Info] & replace with BodyOrientation[Info]

This commit is contained in:
atlimit8
2015-09-15 22:57:08 -05:00
parent 59edf85513
commit 45112cfa76
34 changed files with 65 additions and 79 deletions

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Renders a parachute on units.")]
public class WithParachuteInfo : UpgradableTraitInfo, ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo>
public class WithParachuteInfo : UpgradableTraitInfo, ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
{
[Desc("The image that contains the parachute sequences.")]
public readonly string Image = null;
@@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
// For this, info.Image must not be null
var overlay = new Animation(self.World, info.Image);
var body = self.Trait<IBodyOrientation>();
var body = self.Trait<BodyOrientation>();
anim = new AnimationWithOffset(overlay,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => IsTraitDisabled && !renderProlonged,