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:
@@ -226,8 +226,18 @@ namespace Barotrauma
|
|||||||
prefab = sp;
|
prefab = sp;
|
||||||
|
|
||||||
spriteColor = prefab.SpriteColor;
|
spriteColor = prefab.SpriteColor;
|
||||||
|
if (ResizeHorizontal && !ResizeVertical)
|
||||||
isHorizontal = (rect.Width > rect.Height);
|
{
|
||||||
|
isHorizontal = true;
|
||||||
|
}
|
||||||
|
else if (ResizeVertical && !ResizeHorizontal)
|
||||||
|
{
|
||||||
|
isHorizontal = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isHorizontal = (rect.Width > rect.Height);
|
||||||
|
}
|
||||||
|
|
||||||
StairDirection = prefab.StairDirection;
|
StairDirection = prefab.StairDirection;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user