Fixed a bug where PNG sprites without an offset incorrectly had their offset centered instead of using (0, 0)

This commit is contained in:
biwa 2020-10-11 13:18:08 +02:00
parent 0486845a1f
commit 3af704b7a6

View file

@ -99,11 +99,10 @@ namespace CodeImp.DoomBuilder.Data
scale.x = 1.0f;
scale.y = 1.0f;
// Make offset corrections if the offset was not given
// Set the offset if the offset was not given
if ((offsetx == int.MinValue) || (offsety == int.MinValue))
{
offsetx = (int)((width * scale.x) * 0.5f);
offsety = (int)(height * scale.y);
offsetx = offsety = 0;
}
});
}