From 1f5239b14137f780bba6df57c31f85e3972ebb72 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 13 Aug 2018 14:55:26 +0300 Subject: [PATCH] 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 --- .../BarotraumaShared/Source/Map/Structure.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Map/Structure.cs b/Barotrauma/BarotraumaShared/Source/Map/Structure.cs index 69974ebb2..2c6b073bd 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Structure.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Structure.cs @@ -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;