From 0d71a2bb8fe90bfaaae4e62d921dbf94e69064b4 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 3 Aug 2014 22:38:50 +0100 Subject: mess update ( hide avatars ) --- .../CoreModules/World/Land/LandManagementModule.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index d8e3082..c8555ab 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) { -- cgit v1.1