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;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user