Fixed Tiberian Sun construction yard flickering

as described in #5765.

On 1/07/2014, at 23:11 , Matthias Mailänder <notifications@github.com> wrote:

> In OpenRA.Game/FileFormats/ShpTSReader.cs:
> 
> > @@ -33,7 +33,7 @@ public FrameHeader(Stream stream, Size frameSize)
> >  				var width = stream.ReadUInt16();
> >  				var height = stream.ReadUInt16();
> >  
> > -				Offset = new float2(x + 0.5f * (width - frameSize.Width), y + 0.5f * (height - frameSize.Height));
> > +				Offset = new float2((float)(x + (width - frameSize.Width) / 2), (float)(y + (height - frameSize.Height) / 2));
> Both
> Offset = new float2((float)(x + ((width / 2) - (frameSize.Width / 2))), (float)(y + ((height / 2) - (frameSize.Height / 2))));
> and
> Offset = new float2((float)(x + ((width / 2) - (0.5f * frameSize.Width))), (float)(y + ((height / 2) - (0.5f * frameSize.Height))));
> seem to work well.
> 
> —
> Reply to this email directly or view it on GitHub.
> 

The version that only uses integer division for both glitches by +/- 1px on some frames - easily seen in mutant.shp frames 189-194 (in the asset browser).