diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 57 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 |
3 files changed, 44 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 8bc81ae..aae6603 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -401,30 +401,51 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
401 | 401 | ||
402 | public void SendLandUpdate(ScenePresence avatar, bool force) | 402 | public void SendLandUpdate(ScenePresence avatar, bool force) |
403 | { | 403 | { |
404 | |||
405 | /* stop sendind same data twice | ||
406 | ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), | ||
407 | (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); | ||
408 | |||
409 | if (over != null) | ||
410 | { | ||
411 | |||
412 | if (force) | ||
413 | { | ||
414 | if (!avatar.IsChildAgent) | ||
415 | { | ||
416 | over.SendLandUpdateToClient(avatar.ControllingClient); | ||
417 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, | ||
418 | m_scene.RegionInfo.RegionID); | ||
419 | } | ||
420 | } | ||
421 | |||
422 | if (avatar.currentParcelUUID != over.LandData.GlobalID) | ||
423 | { | ||
424 | if (!avatar.IsChildAgent) | ||
425 | { | ||
426 | over.SendLandUpdateToClient(avatar.ControllingClient); | ||
427 | avatar.currentParcelUUID = over.LandData.GlobalID; | ||
428 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, | ||
429 | m_scene.RegionInfo.RegionID); | ||
430 | } | ||
431 | } | ||
432 | */ | ||
433 | if (avatar.IsChildAgent) | ||
434 | return; | ||
435 | |||
404 | ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), | 436 | ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), |
405 | (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); | 437 | (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); |
406 | 438 | ||
407 | if (over != null) | 439 | if (over != null) |
408 | { | 440 | { |
409 | if (force) | 441 | bool NotsameID = (avatar.currentParcelUUID != over.LandData.GlobalID); |
442 | if (force || NotsameID) | ||
410 | { | 443 | { |
411 | if (!avatar.IsChildAgent) | 444 | over.SendLandUpdateToClient(avatar.ControllingClient); |
412 | { | 445 | if (NotsameID) |
413 | over.SendLandUpdateToClient(avatar.ControllingClient); | ||
414 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, | ||
415 | m_scene.RegionInfo.RegionID); | ||
416 | } | ||
417 | } | ||
418 | |||
419 | if (avatar.currentParcelUUID != over.LandData.GlobalID) | ||
420 | { | ||
421 | if (!avatar.IsChildAgent) | ||
422 | { | ||
423 | over.SendLandUpdateToClient(avatar.ControllingClient); | ||
424 | avatar.currentParcelUUID = over.LandData.GlobalID; | 446 | avatar.currentParcelUUID = over.LandData.GlobalID; |
425 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, | 447 | m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, |
426 | m_scene.RegionInfo.RegionID); | 448 | m_scene.RegionInfo.RegionID); |
427 | } | ||
428 | } | 449 | } |
429 | } | 450 | } |
430 | } | 451 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0237021..0dae946 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2890,9 +2890,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2890 | { | 2890 | { |
2891 | EventManager.TriggerOnClientLogin(client); | 2891 | EventManager.TriggerOnClientLogin(client); |
2892 | // Send initial parcel data | 2892 | // Send initial parcel data |
2893 | /* this is done on TriggerOnNewClient by landmanegement respective event handler | ||
2893 | Vector3 pos = sp.AbsolutePosition; | 2894 | Vector3 pos = sp.AbsolutePosition; |
2894 | ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y); | 2895 | ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y); |
2895 | land.SendLandUpdateToClient(client); | 2896 | land.SendLandUpdateToClient(client); |
2897 | */ | ||
2896 | } | 2898 | } |
2897 | 2899 | ||
2898 | return sp; | 2900 | return sp; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 433efc7..a8aa551 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1315,13 +1315,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1315 | // Create child agents in neighbouring regions | 1315 | // Create child agents in neighbouring regions |
1316 | if (openChildAgents && !IsChildAgent) | 1316 | if (openChildAgents && !IsChildAgent) |
1317 | { | 1317 | { |
1318 | |||
1318 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 1319 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
1319 | if (m_agentTransfer != null) | 1320 | if (m_agentTransfer != null) |
1320 | Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); | 1321 | m_agentTransfer.EnableChildAgents(this); |
1321 | 1322 | ||
1322 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); | 1323 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); |
1323 | if (friendsModule != null) | 1324 | if (friendsModule != null) |
1324 | friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); | 1325 | friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); |
1326 | |||
1325 | } | 1327 | } |
1326 | 1328 | ||
1327 | // m_log.DebugFormat( | 1329 | // m_log.DebugFormat( |