From 90c367e6301de7c287b755aa7330161f64166c5b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Feb 2025 20:44:57 +0000 Subject: [PATCH] make linknumbers 0 and 1 mean RootPart by default. Since we do not consider sitting avatars on root linknumber, we will never be full compatible with sl variations --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8f8afc1b68..62e743648a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3064,13 +3064,9 @@ namespace OpenSim.Region.Framework.Scenes { if (linknum < 2) { - return linknum switch - { - <0 => null, - // old code and sl do ignore linknum = 0 on linksets with more than one prim - 0 => m_parts.Count > 1 ? null : RootPart, - _ => RootPart - }; + // unlike SL 0 or 1 will mean root + // one reason is that we do not consider siting avatars on root linknumber + return linknum < 0 ? null : RootPart; } Span parts = m_parts.GetArray().AsSpan();