diff options
author | UbitUmarov | 2014-08-01 18:59:08 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-01 18:59:08 +0100 |
commit | ef1f37cf20b756e8549305f2d405ea8e9bbda9ff (patch) | |
tree | f838a8a62cca7d9023c23a15afacaf4fddf82dee /OpenSim/Region/CoreModules | |
parent | remove unnecessary sendparceloverlay (diff) | |
download | opensim-SC-ef1f37cf20b756e8549305f2d405ea8e9bbda9ff.zip opensim-SC-ef1f37cf20b756e8549305f2d405ea8e9bbda9ff.tar.gz opensim-SC-ef1f37cf20b756e8549305f2d405ea8e9bbda9ff.tar.bz2 opensim-SC-ef1f37cf20b756e8549305f2d405ea8e9bbda9ff.tar.xz |
handle change of hide avatars flag. Parcel limits edition still need work
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 2de6402..3016bbe 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -194,7 +194,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
194 | client.OnParcelEjectUser += ClientOnParcelEjectUser; | 194 | client.OnParcelEjectUser += ClientOnParcelEjectUser; |
195 | client.OnParcelFreezeUser += ClientOnParcelFreezeUser; | 195 | client.OnParcelFreezeUser += ClientOnParcelFreezeUser; |
196 | client.OnSetStartLocationRequest += ClientOnSetHome; | 196 | client.OnSetStartLocationRequest += ClientOnSetHome; |
197 | /* avatar is still a child here position is unknow | 197 | |
198 | /* avatar is still a child here position is unknown | ||
198 | EntityBase presenceEntity; | 199 | EntityBase presenceEntity; |
199 | if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence) | 200 | if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence) |
200 | { | 201 | { |
@@ -334,12 +335,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
334 | if (!position.HasValue) | 335 | if (!position.HasValue) |
335 | return; | 336 | return; |
336 | 337 | ||
337 | bool isFlying = avatar.PhysicsActor.Flying; | 338 | // land should have no word on avatar physics |
338 | avatar.RemoveFromPhysicalScene(); | 339 | // bool isFlying = avatar.PhysicsActor.Flying; |
340 | // avatar.RemoveFromPhysicalScene(); | ||
339 | 341 | ||
340 | avatar.AbsolutePosition = (Vector3)position; | 342 | avatar.AbsolutePosition = (Vector3)position; |
341 | 343 | ||
342 | avatar.AddToPhysicalScene(isFlying); | 344 | // avatar.AddToPhysicalScene(isFlying); |
343 | } | 345 | } |
344 | 346 | ||
345 | public void SendYouAreRestrictedNotice(ScenePresence avatar) | 347 | public void SendYouAreRestrictedNotice(ScenePresence avatar) |
@@ -388,13 +390,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
388 | 390 | ||
389 | public void sendClientInitialLandInfo(IClientAPI remoteClient) | 391 | public void sendClientInitialLandInfo(IClientAPI remoteClient) |
390 | { | 392 | { |
391 | SendParcelOverlay(remoteClient); | ||
392 | ScenePresence avatar; | 393 | ScenePresence avatar; |
394 | |||
393 | if (!m_scene.TryGetScenePresence(remoteClient.AgentId, out avatar)) | 395 | if (!m_scene.TryGetScenePresence(remoteClient.AgentId, out avatar)) |
394 | return; | 396 | return; |
395 | if (avatar.IsChildAgent) | 397 | if (avatar.IsChildAgent) |
396 | return; | 398 | return; |
397 | 399 | ||
400 | SendParcelOverlay(remoteClient); | ||
401 | |||
398 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X,avatar.AbsolutePosition.Y); | 402 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X,avatar.AbsolutePosition.Y); |
399 | if (over == null) | 403 | if (over == null) |
400 | return; | 404 | return; |
@@ -416,8 +420,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
416 | if (force || NotsameID) | 420 | if (force || NotsameID) |
417 | { | 421 | { |
418 | over.SendLandUpdateToClient(avatar.ControllingClient); | 422 | over.SendLandUpdateToClient(avatar.ControllingClient); |
419 | if (NotsameID) | 423 | SendParcelOverlay(avatar.ControllingClient); |
420 | avatar.currentParcelUUID = over.LandData.GlobalID; | 424 | avatar.currentParcelUUID = over.LandData.GlobalID; |
421 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, | 425 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, |
422 | m_scene.RegionInfo.RegionID); | 426 | m_scene.RegionInfo.RegionID); |
423 | } | 427 | } |
@@ -1190,15 +1194,16 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1190 | bool needOverlay = false; | 1194 | bool needOverlay = false; |
1191 | if (land.UpdateLandProperties(args, remote_client, out snap_selection, out needOverlay)) | 1195 | if (land.UpdateLandProperties(args, remote_client, out snap_selection, out needOverlay)) |
1192 | { | 1196 | { |
1193 | //parcel | 1197 | //the proprieties to who changed it |
1194 | 1198 | ||
1195 | land.SendLandProperties(-10000, true, LandChannel.LAND_RESULT_SINGLE, remote_client); | 1199 | land.SendLandProperties(0, true, LandChannel.LAND_RESULT_SINGLE, remote_client); |
1196 | 1200 | ||
1197 | if (needOverlay) | 1201 | if (needOverlay) |
1198 | { | 1202 | { |
1203 | UUID parcelID = land.LandData.GlobalID; | ||
1199 | m_scene.ForEachRootScenePresence(delegate(ScenePresence avatar) | 1204 | m_scene.ForEachRootScenePresence(delegate(ScenePresence avatar) |
1200 | { | 1205 | { |
1201 | if (avatar.IsChildAgent) | 1206 | if (avatar.IsDeleted || avatar.IsChildAgent) |
1202 | return; | 1207 | return; |
1203 | 1208 | ||
1204 | IClientAPI client = avatar.ControllingClient; | 1209 | IClientAPI client = avatar.ControllingClient; |
@@ -1209,6 +1214,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1209 | if (client != remote_client || land != aland) | 1214 | if (client != remote_client || land != aland) |
1210 | aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client); | 1215 | aland.SendLandProperties(0, false, LandChannel.LAND_RESULT_SINGLE, client); |
1211 | } | 1216 | } |
1217 | if (avatar.currentParcelUUID == parcelID) | ||
1218 | avatar.currentParcelUUID = parcelID; // force parcel flags review | ||
1212 | }); | 1219 | }); |
1213 | } | 1220 | } |
1214 | } | 1221 | } |