From 9bb0dbf1ac0c5f25452d81805bbe0c04c7b38f7c Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 5 Feb 2023 12:04:52 -0800 Subject: [PATCH] fix: Fixes LOS house bug with large items in a container (#1332) --- Projects/Server/Maps/Map.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Projects/Server/Maps/Map.cs b/Projects/Server/Maps/Map.cs index 1cda7182d..6761d2a53 100644 --- a/Projects/Server/Maps/Map.cs +++ b/Projects/Server/Maps/Map.cs @@ -1057,8 +1057,15 @@ public sealed class Map : IComparable, ISpanFormattable, ISpanParsable } else if (o is Item item) { - p = item.GetWorldLocation(); - p.Z += item.ItemData.Height / 2 + 1; + if (item.RootParent != null) + { + p = GetPoint(item.RootParent, eye); + } + else + { + p = item.GetWorldLocation(); + p.Z += item.ItemData.Height / 2 + 1; + } } else if (o is Point3D point3D) {