aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-07 08:15:38 +0000
committerTeravus Ovares2008-02-07 08:15:38 +0000
commit3674257095f0c511b1f5810fdc034c2d49bb73a8 (patch)
treea9b4cda92de5ef51d7626b526aa19cd5a563089d /OpenSim/Region/Environment/LandManagement
parent* didn't save :P so, this is the other half to my last commit (diff)
downloadopensim-SC_OLD-3674257095f0c511b1f5810fdc034c2d49bb73a8.zip
opensim-SC_OLD-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.gz
opensim-SC_OLD-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.bz2
opensim-SC_OLD-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.xz
* This update contains a bucket-full of network optimizations.
* ParcelProperties are sent only when needed instead of on any movement * Terse Updates and other temporary data packets are marked unreliable * After a certain amount of users, the sim actually sends updates on things less * Experimental * Tested to 68 avatar with pCampBot (And it's surprising what actually causes the most lag.. the text chat!)
Diffstat (limited to 'OpenSim/Region/Environment/LandManagement')
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index 09fa09b..dd13fc0 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -718,23 +718,32 @@ namespace OpenSim.Region.Environment.LandManagement
718 } 718 }
719 } 719 }
720 720
721 public void sendLandUpdate(ScenePresence avatar) 721 public void sendLandUpdate(ScenePresence avatar, bool force)
722 { 722 {
723 Land over = getLandObject((int) Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), 723 Land over = getLandObject((int) Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
724 (int) Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); 724 (int) Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
725 725
726 if (over != null) 726 if (over != null)
727 { 727 {
728 over.sendLandUpdateToClient(avatar.ControllingClient); 728 if (force)
729 {
730 over.sendLandUpdateToClient(avatar.ControllingClient);
731 }
732
729 if (avatar.currentParcelUUID != over.landData.globalID) 733 if (avatar.currentParcelUUID != over.landData.globalID)
730 { 734 {
735 over.sendLandUpdateToClient(avatar.ControllingClient);
731 avatar.currentParcelUUID = over.landData.globalID; 736 avatar.currentParcelUUID = over.landData.globalID;
732 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID, 737 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID,
733 m_scene.RegionInfo.RegionID); 738 m_scene.RegionInfo.RegionID);
734 } 739 }
735 } 740 }
736 } 741 }
742 public void sendLandUpdate(ScenePresence avatar)
743 {
744 sendLandUpdate(avatar, false);
737 745
746 }
738 public void handleSignificantClientMovement(IClientAPI remote_client) 747 public void handleSignificantClientMovement(IClientAPI remote_client)
739 { 748 {
740 ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); 749 ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId);