Fixed wall sections being rendered incorrectly if texture scale is changed, fixed gaps between tiles due to the width/height of the tile being rounded down as a result of texture scaling

This commit is contained in:
Joonas Rikkonen
2018-04-10 22:28:14 +03:00
parent 22e2c8d8c2
commit 607acb6e8a
2 changed files with 19 additions and 14 deletions
@@ -164,8 +164,8 @@ namespace Barotrauma
}
Point textureOffset = new Point(
Math.Abs(rect.Location.X - sections[i].rect.Location.X),
Math.Abs(rect.Location.Y - sections[i].rect.Location.Y));
(int)(Math.Abs(rect.Location.X - sections[i].rect.Location.X) / textureScale.X),
(int)(Math.Abs(rect.Location.Y - sections[i].rect.Location.Y) / textureScale.Y));
if (flippedX && isHorizontal)
{