diff --git a/OpenRa.Game/Sprite.cs b/OpenRa.Game/Sprite.cs index 4c19614c2a..7c978c3314 100644 --- a/OpenRa.Game/Sprite.cs +++ b/OpenRa.Game/Sprite.cs @@ -29,22 +29,15 @@ namespace OpenRa.Game uvhax = new float2[] { - MapTextureCoords( new float2(0,0) ), - MapTextureCoords( new float2(1,0) ), - MapTextureCoords( new float2(0,1) ), - MapTextureCoords( new float2(1,1) ), + new float2( uv.Left, uv.Top ), + new float2( uv.Right, uv.Top ), + new float2( uv.Left, uv.Bottom ), + new float2( uv.Right, uv.Bottom ), }; this.size = new float2(bounds.Size); } - public float2 MapTextureCoords(float2 p) - { - return new float2( - p.X > 0 ? uv.Right : uv.Left, - p.Y > 0 ? uv.Bottom : uv.Top); - } - public float2 FastMapTextureCoords(int k) { return uvhax[k];