diff options
author | UbitUmarov | 2016-07-25 19:49:40 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-25 19:49:40 +0100 |
commit | 3f0d84c28b99d789a362e2eacb19145d8144f548 (patch) | |
tree | 151b17d0f562fdfaa4ef8ad94a47b23be2ffe47a | |
parent | remove redundant check (diff) | |
download | opensim-SC-3f0d84c28b99d789a362e2eacb19145d8144f548.zip opensim-SC-3f0d84c28b99d789a362e2eacb19145d8144f548.tar.gz opensim-SC-3f0d84c28b99d789a362e2eacb19145d8144f548.tar.bz2 opensim-SC-3f0d84c28b99d789a362e2eacb19145d8144f548.tar.xz |
cleanup some code
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 45 |
1 files 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 | |||
1289 | bool needOverlay = false; | 1289 | bool needOverlay = false; |
1290 | if (land.UpdateLandProperties(args, remote_client, out snap_selection, out needOverlay)) | 1290 | if (land.UpdateLandProperties(args, remote_client, out snap_selection, out needOverlay)) |
1291 | { | 1291 | { |
1292 | //the proprieties to who changed them | ||
1293 | ScenePresence av = m_scene.GetScenePresence(remote_client.AgentId); | ||
1294 | if(av.IsChildAgent || land != GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y)) | ||
1295 | land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, remote_client); | ||
1296 | else | ||
1297 | land.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, remote_client); | ||
1298 | |||
1299 | UUID parcelID = land.LandData.GlobalID; | 1292 | UUID parcelID = land.LandData.GlobalID; |
1300 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1293 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
1301 | { | 1294 | { |
1302 | if (avatar.IsDeleted || avatar.isNPC) | 1295 | if (avatar.IsDeleted || avatar.isNPC) |
1303 | return; | 1296 | return; |
1304 | 1297 | ||
1305 | IClientAPI client = avatar.ControllingClient; | 1298 | IClientAPI client = avatar.ControllingClient; |
1306 | if (needOverlay) | 1299 | if (needOverlay) |
1307 | SendParcelOverlay(client); | 1300 | SendParcelOverlay(client); |
1308 | 1301 | ||
1309 | if (avatar.IsChildAgent) | 1302 | if (avatar.IsChildAgent) |
1310 | return; | 1303 | { |
1304 | if(client == remote_client) | ||
1305 | land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client); | ||
1306 | return; | ||
1307 | } | ||
1311 | 1308 | ||
1312 | ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 1309 | ILandObject aland = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
1313 | if (aland != null) | 1310 | if (aland != null) |
1314 | { | 1311 | { |
1315 | if (client != remote_client && land == aland) | 1312 | if(client == remote_client && land != aland) |
1313 | land.SendLandProperties(-10000, false, LandChannel.LAND_RESULT_SINGLE, client); | ||
1314 | else if (land == aland) | ||
1316 | aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client); | 1315 | aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client); |
1317 | } | 1316 | } |
1318 | if (avatar.currentParcelUUID == parcelID) | 1317 | if (avatar.currentParcelUUID == parcelID) |
1319 | avatar.currentParcelUUID = parcelID; // force parcel flags review | 1318 | avatar.currentParcelUUID = parcelID; // force parcel flags review |
1320 | }); | 1319 | }); |
1321 | } | 1320 | } |
1322 | } | 1321 | } |
1323 | 1322 | ||