From 3f0d84c28b99d789a362e2eacb19145d8144f548 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 25 Jul 2016 19:49:40 +0100 Subject: cleanup some code --- .../CoreModules/World/Land/LandManagementModule.cs | 45 +++++++++++----------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 95b576f..4324ddc 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1289,35 +1289,34 @@ 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 them - ScenePresence av = m_scene.GetScenePresence(remote_client.AgentId); - if(av.IsChildAgent || land != GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y)) - land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, remote_client); - else - land.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, remote_client); - UUID parcelID = land.LandData.GlobalID; m_scene.ForEachScenePresence(delegate(ScenePresence avatar) - { - if (avatar.IsDeleted || avatar.isNPC) - return; + { + if (avatar.IsDeleted || avatar.isNPC) + return; - IClientAPI client = avatar.ControllingClient; - if (needOverlay) - SendParcelOverlay(client); + IClientAPI client = avatar.ControllingClient; + if (needOverlay) + SendParcelOverlay(client); - if (avatar.IsChildAgent) - return; + if (avatar.IsChildAgent) + { + if(client == remote_client) + land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client); + return; + } - ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - if (aland != null) - { - if (client != remote_client && land == aland) + ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); + if (aland != null) + { + if(client == remote_client && land != aland) + land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client); + else if (land == aland) aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client); - } - if (avatar.currentParcelUUID == parcelID) - avatar.currentParcelUUID = parcelID; // force parcel flags review - }); + } + if (avatar.currentParcelUUID == parcelID) + avatar.currentParcelUUID = parcelID; // force parcel flags review + }); } } -- cgit v1.1