#67 fixed: spinners work again

This commit is contained in:
Chris Forbes
2009-11-01 22:30:28 +13:00
parent 33ef0f6e61
commit e62a0bc717
4 changed files with 16 additions and 4 deletions

View File

@@ -87,7 +87,9 @@ namespace OpenRa.Game.Traits
var bodyFacing = self.traits.Get<Mobile>().facing;
var quantizedFacing = bodyFacing - bodyFacing % ru.anim.CurrentSequence.Length;
return (RotateVectorByFacing(new float2(offset[0], offset[1]), quantizedFacing, .7f) + GetRecoil(self, recoil));
return (RotateVectorByFacing(new float2(offset[0], offset[1]), quantizedFacing, .7f) + GetRecoil(self, recoil))
+ new float2(self.unitInfo.ScreenSpaceTurretOffset[0],
self.unitInfo.ScreenSpaceTurretOffset[1]);
}
public static Pair<Sprite, float2> Centered(Sprite s, float2 location)