From e296f25445ef5d0fc8d114aed6241da664c57b34 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 1 Aug 2014 19:52:55 +0100 Subject: sitting avatars hidding by their position. This is not as SL that uses avatar sitting on root prim. All cases have good and bad situations, this is simpler. Only SOG position changes triggers checks, rotation alone will not. ( as happens in other cases ) (UNTESTED, as usual ) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 +++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ae14af2..494c9e0 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(); } -- cgit v1.1