diff options
author | UbitUmarov | 2012-09-07 11:37:51 +0100 |
---|---|---|
committer | UbitUmarov | 2012-09-07 11:37:51 +0100 |
commit | c83dd021f300a4272c8a869d20087dac29992c6d (patch) | |
tree | 8b662533d4a923c0facba4c66e8613fa9988fecb /OpenSim | |
parent | remove fireandforget call to EnableChildAgents at end on CompleteMovement, (diff) | |
download | opensim-SC-c83dd021f300a4272c8a869d20087dac29992c6d.zip opensim-SC-c83dd021f300a4272c8a869d20087dac29992c6d.tar.gz opensim-SC-c83dd021f300a4272c8a869d20087dac29992c6d.tar.bz2 opensim-SC-c83dd021f300a4272c8a869d20087dac29992c6d.tar.xz |
stop sending duplicated parcelProprieties at login
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 57 |
1 files changed, 39 insertions, 18 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 | } |