Fix RCS1089

This commit is contained in:
RoosterDragon
2023-03-18 12:50:55 +00:00
committed by Gustas
parent 4dd787be13
commit eb287d9b8d
17 changed files with 26 additions and 23 deletions

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
public ShpD2Frame(Stream s)
{
var flags = (FormatFlags)s.ReadUInt16();
s.Position += 1;
s.Position++;
var width = s.ReadUInt16();
var height = s.ReadUInt8();
Size = new Size(width, height);

View File

@@ -250,9 +250,9 @@ namespace OpenRA.Mods.Cnc.Traits
// Width and height must be even to avoid rendering glitches
if ((width & 1) == 1)
width += 1;
width++;
if ((height & 1) == 1)
height += 1;
height++;
size = new Size(width, height);
}