From 730458be1f8c74da1c112df36ec54233b30caed0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 25 Sep 2009 14:31:29 +0100 Subject: minor: remove some mono compiler warnings --- .../Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs index 5d65f98..62efd60 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs @@ -47,8 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // This maps between inventory server urls and inventory server clients - private Dictionary m_inventoryServers = new Dictionary(); - +// private Dictionary m_inventoryServers = new Dictionary(); private Scene m_scene; #endregion @@ -72,13 +71,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid return null; } - private string UserInventoryURL(UUID userID) - { - CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); - if (uinfo != null) - return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI; - return null; - } +// private string UserInventoryURL(UUID userID) +// { +// CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); +// if (uinfo != null) +// return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI; +// return null; +// } private bool IsLocalUser(UUID userID) { -- cgit v1.1 From 0a0b532270d7cc952648b99ed7ab7ec3b0f99676 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 25 Sep 2009 15:31:19 -0400 Subject: * Fixes teleporting within megaregions on HG enabled regions. You can teleport around now. (but it still doesn't fix the inconsistent attachment state when teleporting into region slots that are not the south west region on megaregions) --- .../Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | 10 ++++++++-- OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index 5c99d73..efc644d 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid if (regionHandle == m_regionInfo.RegionHandle) { // Teleport within the same region - if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0) + if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0) { Vector3 emergencyPos = new Vector3(128, 128, 128); @@ -89,7 +89,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid // TODO: Get proper AVG Height float localAVHeight = 1.56f; - float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y]; + float posZLimit = 22; + + if (position.X > 0 && position.X <= (int)Constants.RegionSize && position.Y > 0 && position.Y <= (int)Constants.RegionSize) + { + posZLimit = (float) avatar.Scene.Heightmap[(int) position.X, (int) position.Y]; + } + float newPosZ = posZLimit + localAVHeight; if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) { diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 56cd87d..5f2333e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -1170,7 +1170,7 @@ namespace OpenSim.Region.Framework.Scenes } } - private bool IsOutsideRegion(Scene s, Vector3 pos) + protected bool IsOutsideRegion(Scene s, Vector3 pos) { if (s.TestBorderCross(pos,Cardinals.N)) -- cgit v1.1 From 2bb513329ac98914ff13a2817aa83b60d85603d9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 25 Sep 2009 16:06:04 -0400 Subject: * Does a full battery of tests to ensure that the object isn't an attachment before border crossing * Fixes 'Inconsistent Attachment State' when teleporting into another region besides the SW most region slot on a MegaRegion. * Fixes a host of other unintended attachment border cross edge cases that lead to Inconsistent attachment state. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3c17bbe..ad5d56f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes } } + private bool IsAttachmentCheckFull() + { + return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); + } + /// /// The absolute position of this scene object in the scene /// @@ -257,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) - && !IsAttachment) + && !IsAttachmentCheckFull()) { m_scene.CrossPrimGroupIntoNewRegion(val, this, true); } -- cgit v1.1