removed ScreenSpaceTurretOffset bs. if you want a screenspace offset, it's the 3rd and 4th elements of the PrimaryOffset / SecondaryOffset

This commit is contained in:
Chris Forbes
2009-11-03 18:00:10 +13:00
parent 36ac9e156a
commit 2fe3618b23
3 changed files with 10 additions and 14 deletions

View File

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