diff --git a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs index 1c2ab4b950..14e5ee2eb4 100755 --- a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; +using OpenRA.Mods.RA.Buildings; namespace OpenRA.Mods.RA.Render { @@ -48,7 +49,10 @@ namespace OpenRA.Mods.RA.Render : base(init, info) { roof = new Animation(GetImage(init.self)); - anims.Add("roof", new AnimationWithOffset(roof, null, () => !buildComplete, 24)); + + var bi = init.self.Info.Traits.Get(); + anims.Add("roof", new AnimationWithOffset(roof, null, + () => !buildComplete, FootprintUtils.CenterOffset(bi).Y)); } public void BuildingComplete( Actor self ) diff --git a/OpenRA.Mods.RA/Render/WithTurret.cs b/OpenRA.Mods.RA/Render/WithTurret.cs index 59b732b43d..50b55ab1a9 100755 --- a/OpenRA.Mods.RA/Render/WithTurret.cs +++ b/OpenRA.Mods.RA/Render/WithTurret.cs @@ -53,7 +53,7 @@ namespace OpenRA.Mods.RA.Render anim = new Animation(rs.GetImage(self), () => t.turretFacing); anim.Play(info.Sequence); rs.anims.Add("turret_{0}".F(info.Turret), new AnimationWithOffset( - anim, () => TurretOffset(self), null, 24)); + anim, () => TurretOffset(self), null, t.Offset.Length)); } WVec TurretOffset(Actor self)