From 6c8c8d669b3adb2c47429341f1a28fc7c4803c81 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 7 Aug 2010 00:45:04 +0100 Subject: minor: a few miscellaneous comments --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 +++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f47450f..03549d7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1720,6 +1720,8 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// + /// + /// protected internal void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) { //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); @@ -1734,6 +1736,9 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// + /// + /// + /// protected internal SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) { //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3dac0ad..0c35eec 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1162,6 +1162,10 @@ namespace OpenSim.Region.Framework.Scenes set { _nextOwnerMask = value; } } + /// + /// Property flags. See OpenMetaverse.PrimFlags + /// + /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge public PrimFlags Flags { get { return _flags; } -- cgit v1.1 From 8d520f4525ffafc6cecacea5e88eea524226a70f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 7 Aug 2010 00:50:01 +0100 Subject: Remove old test classes that don't actually test anything not done elsewhere Also comment out log4net line in InventoryArchiverTests --- .../Archiver/Tests/InventoryArchiverTests.cs | 2 +- .../Framework/Scenes/Tests/SceneBaseTests.cs | 86 ------------ .../Region/Framework/Scenes/Tests/SceneTests.cs | 147 --------------------- 3 files changed, 1 insertion(+), 234 deletions(-) delete mode 100644 OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs delete mode 100644 OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 2d80382..3fb2c8c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests public void TestMergeIarPath() { TestHelper.InMethod(); - log4net.Config.XmlConfigurator.Configure(); +// log4net.Config.XmlConfigurator.Configure(); Scene scene = SceneSetupHelpers.SetupScene("inventory"); UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs deleted file mode 100644 index 42587c1..0000000 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenMetaverse; -using OpenSim.Framework; -using GridRegion = OpenSim.Services.Interfaces.GridRegion; - -namespace OpenSim.Region.Framework.Scenes.Tests -{ - /// - /// Scene presence tests - /// - [TestFixture] - public class SceneBaseTests - { - private class SceneBaseImpl : SceneBase - { - public override void Update() - { - throw new NotImplementedException(); - } - - public override void LoadWorldMap() - { - throw new NotImplementedException(); - } - - public override void AddNewClient(IClientAPI client) - { - throw new NotImplementedException(); - } - - public override void RemoveClient(UUID agentID) - { - throw new NotImplementedException(); - } - - public override void OtherRegionUp(GridRegion otherRegion) - { - throw new NotImplementedException(); - } - - public override bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence) - { - throw new NotImplementedException(); - } - - public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) - { - throw new NotImplementedException(); - } - } - - [Test] - public void TestConstructor() - { - new SceneBaseImpl(); - } - } -} diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs deleted file mode 100644 index 8b2d387..0000000 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using NUnit.Framework; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Region.Framework.Interfaces; - -namespace OpenSim.Region.Framework.Scenes.Tests -{ - /// - /// Scene presence tests - /// - [TestFixture] - public class SceneTests - { - private class FakeStorageManager : StorageManager - { - private class FakeRegionDataStore : IRegionDataStore - { - public void Initialise(string filename) - { - } - - public void Dispose() - { - } - - public void StoreObject(SceneObjectGroup obj, UUID regionUUID) - { - throw new NotImplementedException(); - } - - public void RemoveObject(UUID uuid, UUID regionUUID) - { - throw new NotImplementedException(); - } - - public void StorePrimInventory(UUID primID, ICollection items) - { - throw new NotImplementedException(); - } - - public List LoadObjects(UUID regionUUID) - { - throw new NotImplementedException(); - } - - public void StoreTerrain(double[,] terrain, UUID regionID) - { - throw new NotImplementedException(); - } - - public double[,] LoadTerrain(UUID regionID) - { - throw new NotImplementedException(); - } - - public void StoreLandObject(ILandObject Parcel) - { - throw new NotImplementedException(); - } - - public void RemoveLandObject(UUID globalID) - { - throw new NotImplementedException(); - } - - public List LoadLandObjects(UUID regionUUID) - { - throw new NotImplementedException(); - } - - public void StoreRegionSettings(RegionSettings rs) - { - throw new NotImplementedException(); - } - public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) - { - //This connector doesn't support the windlight module yet - //Return default LL windlight settings - return new RegionLightShareData(); - } - public void StoreRegionWindlightSettings(RegionLightShareData wl) - { - //This connector doesn't support the windlight module yet - } - public RegionSettings LoadRegionSettings(UUID regionUUID) - { - return null; - } - - public void Shutdown() - { - throw new NotImplementedException(); - } - } - - public FakeStorageManager() : base(new FakeRegionDataStore()) - { - } - - public FakeStorageManager(IRegionDataStore storage) : this() - { - } - - public FakeStorageManager(string dllName, string connectionstring, string estateconnectionstring) : this() - { - } - } - - [Test] - public void TestConstructor() - { - RegionInfo regionInfo = new RegionInfo(0,0,null,null); - FakeStorageManager storageManager = new FakeStorageManager(); - - new Scene(regionInfo, null, null, storageManager, null, false, false, false, null, null); - } - } -} -- cgit v1.1 From 7e47ab746ef588648b8edbbc7cfb48c4d90c5e34 Mon Sep 17 00:00:00 2001 From: Marck Date: Fri, 6 Aug 2010 07:46:19 +0200 Subject: Allow creation of link regions if there is an existing region within a 4096 range. Also add GetHyperlinks() to the grid service. --- .../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 5 +++++ .../ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index b2e3f4f..9ea04d4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -233,6 +233,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return m_GridService.GetFallbackRegions(scopeID, x, y); } + public List GetHyperlinks(UUID scopeID) + { + return m_GridService.GetHyperlinks(scopeID); + } + public int GetRegionFlags(UUID scopeID, UUID regionID) { return m_GridService.GetRegionFlags(scopeID, regionID); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 95d8737..1366980 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -136,6 +136,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests 900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize); Assert.IsNotNull(results, "Retrieved GetRegionRange list is null"); Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); + + results = m_LocalConnector.GetHyperlinks(UUID.Zero); + Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); + Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected"); + } } } -- cgit v1.1 From 4e2caab756e1b7ebd58682efe92401e2e2d5a917 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 7 Aug 2010 01:06:47 +0100 Subject: Add new SceneGraphTests class. Add simple TestDuplicateObject() --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Framework/Scenes/Tests/SceneGraphTests.cs | 71 ++++++++++++++++++++++ .../Scenes/Tests/SceneObjectBasicTests.cs | 1 - 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 03549d7..9f38a99 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1739,7 +1739,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - protected internal SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) + public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) { //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); SceneObjectGroup original = GetGroupByPrim(originalPrimID); diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs new file mode 100644 index 0000000..8a103d7 --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Reflection; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; +using OpenSim.Tests.Common.Setup; + +namespace OpenSim.Region.Framework.Scenes.Tests +{ + [TestFixture] + public class SceneGraphTests + { + [Test] + public void TestDuplicateObject() + { + TestHelper.InMethod(); + Scene scene = SceneSetupHelpers.SetupScene(); + + UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010"); + string objName = "obj1"; + UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); + + SceneObjectPart part + = new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) + { Name = objName, UUID = objUuid }; + + scene.AddNewSceneObject(new SceneObjectGroup(part), false); + + SceneObjectGroup duplicatedSo + = scene.SceneGraph.DuplicateObject( + part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity); + + Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1)); + Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId)); + + //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 4baa22c..d4f9f18 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -32,7 +32,6 @@ using NUnit.Framework.SyntaxHelpers; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; - using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; -- cgit v1.1 From 009053479302e7581a85c7574a6cc8eaa23745d8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 6 Aug 2010 17:43:09 -0700 Subject: Added Check4096 config var under [GridService], at the request of many. Changed the iteration that Marck had on the Hyperlinker. ATTENTION! CONFIGURATION CHANGE AFFECTING Robust.HG.ini.example and StandaloneCommon.ini.example. --- .../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 8 ++++---- .../ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 9ea04d4..023a44c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -233,10 +233,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return m_GridService.GetFallbackRegions(scopeID, x, y); } - public List GetHyperlinks(UUID scopeID) - { - return m_GridService.GetHyperlinks(scopeID); - } + public List GetHyperlinks(UUID scopeID) + { + return m_GridService.GetHyperlinks(scopeID); + } public int GetRegionFlags(UUID scopeID, UUID regionID) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 1366980..2726ae8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -136,9 +136,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests 900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize); Assert.IsNotNull(results, "Retrieved GetRegionRange list is null"); Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); - - results = m_LocalConnector.GetHyperlinks(UUID.Zero); - Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); + + results = m_LocalConnector.GetHyperlinks(UUID.Zero); + Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected"); } -- cgit v1.1 From 2cedfba67c49b32406005ce3d1bc62d302ef3d19 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Aug 2010 03:38:35 +0200 Subject: Make the landmark properties work again --- .../CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs index b0ace39..153c2a5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs @@ -90,7 +90,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land if (!m_Enabled) return; - m_GridService = scene.GridService; m_LocalService.AddRegion(scene); scene.RegisterModuleInterface(this); } @@ -103,6 +102,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land public void RegionLoaded(Scene scene) { + m_GridService = scene.GridService; } -- cgit v1.1 From 59af886680d4034e38a1a24a532bb1dd1160516b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Aug 2010 05:42:30 +0200 Subject: Change the (hackish) constant to match the changed enum for attachs --- OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index d895bb1..365cdbb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -279,8 +279,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments objatt.HasGroupChanged = true; // Fire after attach, so we don't get messy perms dialogs - // 3 == AttachedRez - objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 3); + // 4 == AttachedRez + objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); objatt.ResumeScripts(); // Do this last so that event listeners have access to all the effects of the attachment -- cgit v1.1 From 00fd2e0446382af1a3581c8feec359cad5b939aa Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Aug 2010 05:45:52 +0200 Subject: Correct display of landmark about info. Also correct region maturity rating in LM info. Maturity is NOT the parcel's setting, that is only for the image and text. Parcel maturity is governed by region maturity. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- .../ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs | 4 +++- .../ServiceConnectorsOut/Land/LocalLandServiceConnector.cs | 4 +++- .../ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs | 6 +++--- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 6 +++++- 5 files changed, 17 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index c59eedf..7bf7511 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2656,7 +2656,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Bit 0: Mature, bit 7: on sale, other bits: no idea reply.Data.Flags = (byte)( - ((land.Flags & (uint)ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + + (info.AccessLevel > 13 ? (1 << 0) : 0) + ((land.Flags & (uint)ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); Vector3 pos = land.UserLocation; @@ -2664,8 +2664,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { pos = (land.AABBMax + land.AABBMin) * 0.5f; } - reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; - reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; + reply.Data.GlobalX = info.RegionLocX + x; + reply.Data.GlobalY = info.RegionLocY + y; reply.Data.GlobalZ = pos.Z; reply.Data.SimName = Utils.StringToBytes(info.RegionName); reply.Data.SnapshotID = land.SnapshotID; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index bce160a..23251c9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land #region ILandService - public LandData GetLandData(ulong regionHandle, uint x, uint y) + public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", regionHandle, m_Scenes.Count); @@ -130,10 +130,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land if (s.RegionInfo.RegionHandle == regionHandle) { m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); + regionAccess = s.RegionInfo.AccessLevel; return s.GetLandData(x, y); } } m_log.DebugFormat("[LAND IN CONNECTOR]: region handle {0} not found", regionHandle); + regionAccess = 42; return null; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs index cb87f6f..e15f624 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs @@ -116,8 +116,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land #region ILandService - public LandData GetLandData(ulong regionHandle, uint x, uint y) + public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { + regionAccess = 2; m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}", regionHandle, x, y); @@ -126,6 +127,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land if (s.RegionInfo.RegionHandle == regionHandle) { LandData land = s.GetLandData(x, y); + regionAccess = s.RegionInfo.AccessLevel; return land; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs index 153c2a5..2386060 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs @@ -108,13 +108,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land #region ILandService - public override LandData GetLandData(ulong regionHandle, uint x, uint y) + public override LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { - LandData land = m_LocalService.GetLandData(regionHandle, x, y); + LandData land = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess); if (land != null) return land; - return base.GetLandData(regionHandle, x, y); + return base.GetLandData(regionHandle, x, y, out regionAccess); } #endregion ILandService diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4ccd0f0..31aa017 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -51,6 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land public LandData LandData; public ulong RegionHandle; public uint X, Y; + public byte RegionAccess; } public class LandManagementModule : INonSharedRegionModule @@ -1459,13 +1460,15 @@ namespace OpenSim.Region.CoreModules.World.Land if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) { extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; + extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; } else { ILandService landService = m_scene.RequestModuleInterface(); extLandData.LandData = landService.GetLandData(extLandData.RegionHandle, extLandData.X, - extLandData.Y); + extLandData.Y, + out extLandData.RegionAccess); if (extLandData.LandData == null) { // we didn't find the region/land => don't cache @@ -1497,6 +1500,7 @@ namespace OpenSim.Region.CoreModules.World.Land r.RegionName = info.RegionName; r.RegionLocX = (uint)info.RegionLocX; r.RegionLocY = (uint)info.RegionLocY; + r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess); remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y); } else -- cgit v1.1