diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index ba97c47b90..28758a9e13 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -701,6 +701,11 @@ namespace OpenSim.Region.Framework.Scenes part.GroupPosition = val; } + foreach (ScenePresence av in m_linkedAvatars) + { + av.sitSOGmoved(); + } + // now that position is changed tell it to scripts if (triggerScriptEvent) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ae14af21c8..494c9e0008 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -163,6 +163,7 @@ namespace OpenSim.Region.Framework.Scenes } m_currentParcelUUID = value; m_currentParcelHide = false; + ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y); if (land != null && !land.LandData.SeeAVs) m_currentParcelHide = true; @@ -172,6 +173,23 @@ namespace OpenSim.Region.Framework.Scenes } } + public void sitSOGmoved() + { + if (IsDeleted || !IsSatOnObject) + //what me? nahh + return; + if (IsInTransit) + return; + + ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y); + if (land == null) + return; //?? + UUID parcelID = land.LandData.GlobalID; + if (m_currentParcelUUID != parcelID) + currentParcelUUID = parcelID; + } + + public bool ParcelAllowThisAvatarSounds { get @@ -2707,7 +2725,7 @@ namespace OpenSim.Region.Framework.Scenes if (satOnObject) { - SendAvatarDataToAllAgents(); +// SendAvatarDataToAllAgents(); m_requestedSitTargetID = 0; part.RemoveSittingAvatar(UUID); @@ -2719,6 +2737,22 @@ namespace OpenSim.Region.Framework.Scenes AddToPhysicalScene(false); Animator.TrySetMovementAnimation("STAND"); + + if (satOnObject) + { + ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X,AbsolutePosition.Y); + if (land != null) + { + UUID parcelID = land.LandData.GlobalID; + if (m_currentParcelUUID != parcelID) + currentParcelUUID = parcelID; + else + SendAvatarDataToAllAgents(); + } + else + SendAvatarDataToAllAgents(); + } + TriggerScenePresenceUpdated(); }