From 616fa8dbee0fb71003ed8ff970ad84b3aaafae5e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 28 Dec 2018 21:26:07 +0000 Subject: [PATCH] sog GetLinkNumber() forget avatars that did standup --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 5 +++-- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9c3f166b30..b5c8cf2efd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -5526,11 +5526,12 @@ namespace OpenSim.Region.Framework.Scenes return -1; } - public void InvalidatePartsLinkMaps() + public void InvalidatePartsLinkMaps(bool all = true) { lock(m_partsNameToLinkMap) { - m_partsNameToLinkMap.Clear(); + if(all) + m_partsNameToLinkMap.Clear(); GetLinkNumber_lastname = String.Empty; GetLinkNumber_lastnumber = -1; } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c549f5c6a0..b427c1aef8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5638,8 +5638,8 @@ namespace OpenSim.Region.Framework.Scenes if (m_sittingAvatars.Count == 0) m_sittingAvatars = null; - ParentGroup.m_sittingAvatars.Remove(sp); - + if(ParentGroup.m_sittingAvatars.Remove(sp)) + ParentGroup.InvalidatePartsLinkMaps(false); return true; }