Horizontally resizeable walls are considered horizontal regardless of their size (and the same for vertical ones). Fixes orientation of short but thick walls (e.g. a tiny piece of a heavy wall) being wrong. Closes #648

This commit is contained in:
Joonas Rikkonen
2018-08-13 14:55:26 +03:00
parent 091dcf35e6
commit 1f5239b141

View File

@@ -226,8 +226,18 @@ namespace Barotrauma
prefab = sp;
spriteColor = prefab.SpriteColor;
isHorizontal = (rect.Width > rect.Height);
if (ResizeHorizontal && !ResizeVertical)
{
isHorizontal = true;
}
else if (ResizeVertical && !ResizeHorizontal)
{
isHorizontal = false;
}
else
{
isHorizontal = (rect.Width > rect.Height);
}
StairDirection = prefab.StairDirection;