From dbcab80520119230c0f988eac3cd75742a74dc26 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 31 Oct 2007 09:50:36 +0000 Subject: fixed bug with user not getting land properties on login --- OpenSim/Region/Environment/LandManagement/Land.cs | 7 ++++++- .../Region/Environment/LandManagement/LandManager.cs | 17 ++++++++++++----- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 ++ 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index e9837c0..bf35b57 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -220,6 +220,11 @@ namespace OpenSim.Region.Environment.LandManagement } } + public void sendLandUpdateToClient(IClientAPI remote_client) + { + sendLandProperties(0, false, 0, remote_client); + } + public void sendLandUpdateToAvatarsOverMe() { List avatars = m_scene.GetAvatars(); @@ -230,7 +235,7 @@ namespace OpenSim.Region.Environment.LandManagement (int) Math.Round(avatars[i].AbsolutePosition.Y)); if (over.landData.localID == landData.localID) { - sendLandProperties(0, false, 0, avatars[i].ControllingClient); + sendLandUpdateToClient(avatars[i].ControllingClient); } } } diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index 785aafa..a1cfa8a 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs @@ -533,17 +533,24 @@ namespace OpenSim.Region.Environment.LandManagement addLandObject(fullSimParcel); } + public void sendLandUpdate(ScenePresence avatar) + { + Land over = getLandObject((int) Math.Round(avatar.AbsolutePosition.X), + (int) Math.Round(avatar.AbsolutePosition.Y)); + + if (over != null) + { + over.sendLandUpdateToClient(avatar.ControllingClient); + } + } public void handleSignificantClientMovement(IClientAPI remote_client) { ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); + if (clientAvatar != null) { - Land over = getLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); - if (over != null) - { - over.sendLandProperties(0, false, 0, remote_client); - } + sendLandUpdate(clientAvatar); } } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 8d326cf..763be03 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -281,6 +281,8 @@ namespace OpenSim.Region.Environment.Scenes { //do we need to use newAvatar? not sure so have added this to kill the compile warning } + + m_scene.LandManager.sendLandUpdate(this); } #endregion -- cgit v1.1