diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index d8e3082c44..c8555abcc3 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.World.Land public void SendOutNearestBanLine(IClientAPI client) { ScenePresence sp = m_scene.GetScenePresence(client.AgentId); - if (sp == null || sp.IsChildAgent) + if (sp == null) return; List checkLandParcels = ParcelsNearPoint(sp.AbsolutePosition); @@ -394,11 +394,12 @@ namespace OpenSim.Region.CoreModules.World.Land if (!m_scene.TryGetScenePresence(remoteClient.AgentId, out avatar)) return; - if (avatar.IsChildAgent) - return; SendParcelOverlay(remoteClient); + if (avatar.IsChildAgent) + return; + ILandObject over = GetLandObject(avatar.AbsolutePosition.X,avatar.AbsolutePosition.Y); if (over == null) return; @@ -958,7 +959,7 @@ namespace OpenSim.Region.CoreModules.World.Land UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); m_scene.ForEachClient(SendParcelOverlay); result.SendLandUpdateToAvatarsOverMe(); - + startLandObject.SendLandUpdateToAvatarsOverMe(); } /// @@ -1047,7 +1048,6 @@ namespace OpenSim.Region.CoreModules.World.Land /// The object representing the client public void SendParcelOverlay(IClientAPI remote_client) { - if (remote_client.SceneAgent.PresenceType == PresenceType.Npc) return; @@ -1198,20 +1198,24 @@ namespace OpenSim.Region.CoreModules.World.Land bool needOverlay = false; if (land.UpdateLandProperties(args, remote_client, out snap_selection, out needOverlay)) { - //the proprieties to who changed it + //the proprieties to who changed them land.SendLandProperties(0, true, LandChannel.LAND_RESULT_SINGLE, remote_client); if (needOverlay) { UUID parcelID = land.LandData.GlobalID; - m_scene.ForEachRootScenePresence(delegate(ScenePresence avatar) + m_scene.ForEachScenePresence(delegate(ScenePresence avatar) { - if (avatar.IsDeleted || avatar.IsChildAgent) + if (avatar.IsDeleted || avatar.isNPC) return; IClientAPI client = avatar.ControllingClient; SendParcelOverlay(client); + + if (avatar.IsChildAgent) + return; + ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); if (aland != null) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7b0b1033d2..03eac77182 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -178,7 +178,7 @@ namespace OpenSim.Region.Framework.Scenes if (land != null && !land.LandData.SeeAVs) m_currentParcelHide = true; - if (m_previusParcelUUID != UUID.Zero) + if (m_previusParcelUUID != UUID.Zero || checksame) ParcelCrossCheck(m_currentParcelUUID,m_previusParcelUUID,m_currentParcelHide, m_previusParcelHide, oldhide,checksame); } } @@ -1847,7 +1847,6 @@ namespace OpenSim.Region.Framework.Scenes } } - // send agentData to all clients including us (?) // get appearance // if in cache sent it to all clients @@ -1857,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes // attachments if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0) { -// if (Scene.AttachmentsModule != null) + if (Scene.AttachmentsModule != null) // Util.FireAndForget( // o => // { @@ -5418,11 +5417,14 @@ namespace OpenSim.Region.Framework.Scenes foreach (ScenePresence p in viewsToSendme) { m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname); - ControllingClient.SendAvatarDataImmediate(p); - p.SendAppearanceToAgent(this); - p.SendAttachmentsToClient(ControllingClient); - if (p.Animator != null) - p.Animator.SendAnimPackToClient(ControllingClient); + if (!p.IsChildAgent) + { + ControllingClient.SendAvatarDataImmediate(p); + p.SendAppearanceToAgent(this); + p.SendAttachmentsToClient(ControllingClient); + if (p.Animator != null) + p.Animator.SendAnimPackToClient(ControllingClient); + } } } } @@ -5524,11 +5526,14 @@ namespace OpenSim.Region.Framework.Scenes foreach (ScenePresence p in viewsToSendme) { m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname); - ControllingClient.SendAvatarDataImmediate(p); - p.SendAppearanceToAgent(this); - p.SendAttachmentsToClient(ControllingClient); - if (p.Animator != null) - p.Animator.SendAnimPackToClient(ControllingClient); + if (!p.IsChildAgent) + { + ControllingClient.SendAvatarDataImmediate(p); + p.SendAppearanceToAgent(this); + p.SendAttachmentsToClient(ControllingClient); + if (p.Animator != null) + p.Animator.SendAnimPackToClient(ControllingClient); + } } } } @@ -5562,11 +5567,14 @@ namespace OpenSim.Region.Framework.Scenes foreach (ScenePresence p in viewsToSendme) { m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname); - ControllingClient.SendAvatarDataImmediate(p); - p.SendAppearanceToAgent(this); - p.SendAttachmentsToClient(ControllingClient); - if (p.Animator != null) - p.Animator.SendAnimPackToClient(ControllingClient); + if (!p.IsChildAgent) + { + ControllingClient.SendAvatarDataImmediate(p); + p.SendAppearanceToAgent(this); + p.SendAttachmentsToClient(ControllingClient); + if (p.Animator != null) + p.Animator.SendAnimPackToClient(ControllingClient); + } } } } @@ -5629,8 +5637,7 @@ namespace OpenSim.Region.Framework.Scenes // those on not on parcel see me if (currentParcelID != p.currentParcelUUID) - { - m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname); + { viewsToSendto.Add(p); // they see me } } @@ -5775,11 +5782,14 @@ namespace OpenSim.Region.Framework.Scenes foreach (ScenePresence p in viewsToSendme) { m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname); - ControllingClient.SendAvatarDataImmediate(p); - p.SendAppearanceToAgent(this); - p.SendAttachmentsToClient(ControllingClient); - if (p.Animator != null) - p.Animator.SendAnimPackToClient(ControllingClient); + if (!p.IsChildAgent) + { + ControllingClient.SendAvatarDataImmediate(p); + p.SendAppearanceToAgent(this); + p.SendAttachmentsToClient(ControllingClient); + if (p.Animator != null) + p.Animator.SendAnimPackToClient(ControllingClient); + } } } }