From 903cfa8c7ee73e7cd3fa8dc06c0b7ac8ac48cbad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 7 Aug 2010 22:28:42 +0100 Subject: minor: Remove overly verbose schedule full update log message for attachments --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e26e4ae..a2c3c07 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2001,8 +2001,8 @@ namespace OpenSim.Region.Framework.Scenes /// public void ScheduleGroupForFullUpdate() { - if (IsAttachment) - m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); +// if (IsAttachment) +// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); checkAtTargets(); RootPart.ScheduleFullUpdate(); -- cgit v1.1 From cd2c7b9ac983aea6674cd6f89797c5e76287b74e Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 8 Aug 2010 01:57:02 +0100 Subject: In my crusade against facelights, I am striking the killing blow. Add a DisableFacelights option to OpenSim.ini to finally kill those immersion- breaking, silly vanity lights that destroy nighttime RP. Girls, you look just fine without them. Guys, you too. Thank you. Melanie has left the building. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++++++++ OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 5 +++++ 2 files changed, 26 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7bf7511..df2690e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -314,6 +314,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_cachedTextureSerial; private PriorityQueue m_entityUpdates; private Prioritizer m_prioritizer; + private bool m_disableFacelights = false; /// /// List used in construction of data blocks for an object update packet. This is to stop us having to @@ -407,6 +408,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP set { m_IsLoggingOut = value; } } + public bool DisableFacelights + { + get { return m_disableFacelights; } + set { m_disableFacelights = value; } + } + public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } #endregion Properties @@ -3487,6 +3494,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP EntityUpdate update; while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) { + if (update.Entity is SceneObjectPart) + { + SceneObjectPart part = (SceneObjectPart)update.Entity; + + if (part.ParentGroup.IsAttachment && m_disableFacelights) + { + if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && + part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand) + { + part.Shape.LightEntry = false; + } + } + } + ++updatesThisCall; #region UpdateFlags to packet type conversion diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 1b81105..ca5a297 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -153,6 +153,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_defaultRTO = 0; private int m_maxRTO = 0; + private bool m_disableFacelights = false; + public Socket Server { get { return null; } } public LLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) @@ -190,6 +192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_defaultRTO = config.GetInt("DefaultRTO", 0); m_maxRTO = config.GetInt("MaxRTO", 0); + m_disableFacelights = config.GetBoolean("DisableFacelights", false); } else { @@ -898,6 +901,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); client.OnLogout += LogoutHandler; + client.DisableFacelights = m_disableFacelights; + // Start the IClientAPI client.Start(); } -- cgit v1.1 From f216fd8136c1db278bb29f78af4b103ab114f0d4 Mon Sep 17 00:00:00 2001 From: Marck Date: Sun, 8 Aug 2010 12:37:21 +0200 Subject: Tests for distance-sorted fallback regions. With some extensions to existing grid service tests. --- .../Grid/Tests/GridConnectorsTests.cs | 64 +++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 2726ae8..ebfba2b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -57,6 +57,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); + config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion"); + config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion"); + config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion"); + config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion"); m_LocalConnector = new LocalGridServicesConnector(config); } @@ -69,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests { SetUp(); - // Create 3 regions + // Create 4 regions GridRegion r1 = new GridRegion(); r1.RegionName = "Test Region 1"; r1.RegionID = new UUID(1); @@ -82,7 +86,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests s.RegionInfo.RegionID = r1.RegionID; m_LocalConnector.AddRegion(s); - GridRegion r2 = new GridRegion(); r2.RegionName = "Test Region 2"; r2.RegionID = new UUID(2); @@ -107,11 +110,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests s.RegionInfo.RegionID = r3.RegionID; m_LocalConnector.AddRegion(s); + GridRegion r4 = new GridRegion(); + r4.RegionName = "Other Region 4"; + r4.RegionID = new UUID(4); + r4.RegionLocX = 1004 * (int)Constants.RegionSize; + r4.RegionLocY = 1002 * (int)Constants.RegionSize; + r4.ExternalHostName = "127.0.0.1"; + r4.HttpPort = 9004; + r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); + s = new Scene(new RegionInfo()); + s.RegionInfo.RegionID = r4.RegionID; + m_LocalConnector.AddRegion(s); + m_LocalConnector.RegisterRegion(UUID.Zero, r1); + GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test"); Assert.IsNotNull(result, "Retrieved GetRegionByName is null"); Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match"); + m_LocalConnector.RegisterRegion(UUID.Zero, r2); + m_LocalConnector.RegisterRegion(UUID.Zero, r3); + m_LocalConnector.RegisterRegion(UUID.Zero, r4); + result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1)); Assert.IsNotNull(result, "Retrieved GetRegionByUUID is null"); Assert.That(result.RegionID, Is.EqualTo(new UUID(1)), "Retrieved region's UUID does not match"); @@ -120,23 +140,53 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests Assert.IsNotNull(result, "Retrieved GetRegionByPosition is null"); Assert.That(result.RegionLocX, Is.EqualTo(1000 * (int)Constants.RegionSize), "Retrieved region's position does not match"); - m_LocalConnector.RegisterRegion(UUID.Zero, r2); - m_LocalConnector.RegisterRegion(UUID.Zero, r3); - List results = m_LocalConnector.GetNeighbours(UUID.Zero, new UUID(1)); Assert.IsNotNull(results, "Retrieved neighbours list is null"); Assert.That(results.Count, Is.EqualTo(1), "Retrieved neighbour collection is greater than expected"); Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved region's UUID does not match"); results = m_LocalConnector.GetRegionsByName(UUID.Zero, "Test", 10); - Assert.IsNotNull(results, "Retrieved GetRegionsByName list is null"); + Assert.IsNotNull(results, "Retrieved GetRegionsByName collection is null"); Assert.That(results.Count, Is.EqualTo(3), "Retrieved neighbour collection is less than expected"); results = m_LocalConnector.GetRegionRange(UUID.Zero, 900 * (int)Constants.RegionSize, 1002 * (int)Constants.RegionSize, 900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize); - Assert.IsNotNull(results, "Retrieved GetRegionRange list is null"); + Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null"); Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); + results = m_LocalConnector.GetDefaultRegions(UUID.Zero); + Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null"); + Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size"); + Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match"); + + results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY); + Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null"); + Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size"); + Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); + Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); + Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); + + results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY); + Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null"); + Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size"); + Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3"); + Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3"); + Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3"); + + results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY); + Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null"); + Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size"); + Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2"); + Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2"); + Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2"); + + results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY); + Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null"); + Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size"); + Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2"); + Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2"); + Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2"); + 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