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

This commit is contained in:
UbitUmarov
2025-02-07 20:44:57 +00:00
parent 85b0b89992
commit 90c367e630

View File

@@ -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<SceneObjectPart> parts = m_parts.GetArray().AsSpan();