From 48113f0fc811f21f4a113176caa9dbd78c0d3446 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Dec 2011 19:44:52 +0000 Subject: Make it possible to force all prims to be phantom via the collidable_prim boolean setting in the OpenSim.ini config [Startup] section. Naturally, default is true. When set to false, "phantom" flags on prims can be set as usual but all prims remain phantom. This setting is for test purposes. This switch does not affect the collision of avatars with the terrain. --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6666328..96e6863 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -79,6 +79,14 @@ namespace OpenSim.Region.Framework.Scenes /// public bool m_physicalPrim; + /// + /// Controls whether prims can be collided with. + /// + /// + /// If this is set to false then prims cannot be subject to physics either. + /// + public bool CollidablePrims { get; private set; } + public float m_maxNonphys = 256; public float m_maxPhys = 10; public bool m_clampPrimSize; @@ -651,6 +659,7 @@ namespace OpenSim.Region.Framework.Scenes m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); + CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); if (RegionInfo.NonphysPrimMax > 0) -- cgit v1.1 From 7ccd8f8f1d8accb0c5f67e9e3bc9a43fbbfd93e2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Dec 2011 19:57:50 +0000 Subject: rename Scene.m_physicalPrim to PhysicalPrims since its public and access external as a property --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 96e6863..b4972d6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes /// Controls whether physics can be applied to prims. Even if false, prims still have entries in a /// PhysicsScene in order to perform collision detection /// - public bool m_physicalPrim; + public bool PhysicalPrims { get; private set; } /// /// Controls whether prims can be collided with. @@ -658,7 +658,7 @@ namespace OpenSim.Region.Framework.Scenes //Animation states m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); - m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); + PhysicalPrims = startupConfig.GetBoolean("physical_prim", true); CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); -- cgit v1.1 From 56dbcae402000e199e556827944dfdd1bb3a64be Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 30 Dec 2011 21:32:28 -0800 Subject: Bug fix in map tiles in standalone: the map has been blank since commit 01ae916bad672722aa62ee712b7b580d6f5f4370 r/17324 (Nov.18, justincc). But the root cause comes from commit 02e54c57c4901167779f07ed3e89fb1d24ffc22a Author: Oren Hurvitz Date: 7/22/2011 This is a nasty situation. The map tile UUID is, in principle, stored authoritatively in RegionSettings. However, it also needs to be stored in the Grid Service because that's how other sims can retrieve it to send it in Map Blocks to non-V3 viewers. So every time the tile image changes, that change needs to propagate to the Grid Service, and this is done via RegisterRegion (ugh!). Interestingly, this problem didn't affect grids because by default AllowRemoteDelete is false, so the prior images aren't being deleted from the asset servers -- but they were not being correctly updated in the map either, the map was stuck with old images. --- OpenSim/Region/Framework/Scenes/Scene.cs | 33 +++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b4972d6..0f84da9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes if (maptileRefresh != 0) { m_mapGenerationTimer.Interval = maptileRefresh * 1000; - m_mapGenerationTimer.Elapsed += RegenerateMaptile; + m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister; m_mapGenerationTimer.AutoReset = true; m_mapGenerationTimer.Start(); } @@ -1647,21 +1647,17 @@ namespace OpenSim.Region.Framework.Scenes { m_sceneGridService.SetScene(this); + //// Unfortunately this needs to be here and it can't be async. + //// The map tile image is stored in RegionSettings, but it also needs to be + //// stored in the GridService, because that's what the world map module uses + //// to send the map image UUIDs (of other regions) to the viewer... + if (m_generateMaptiles) + RegenerateMaptile(); + GridRegion region = new GridRegion(RegionInfo); string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); if (error != String.Empty) - { throw new Exception(error); - } - - // Generate the maptile asynchronously, because sometimes it can be very slow and we - // don't want this to delay starting the region. - if (m_generateMaptiles) - { - Util.FireAndForget(delegate { - RegenerateMaptile(null, null); - }); - } } #endregion @@ -5032,13 +5028,24 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public void RegenerateMaptile(object sender, ElapsedEventArgs e) + private void RegenerateMaptile() { IWorldMapModule mapModule = RequestModuleInterface(); if (mapModule != null) mapModule.GenerateMaptile(); } + private void RegenerateMaptileAndReregister(object sender, ElapsedEventArgs e) + { + RegenerateMaptile(); + + // We need to propagate the new image UUID to the grid service + // so that all simulators can retrieve it + string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo)); + if (error != string.Empty) + throw new Exception(error); + } + // This method is called across the simulation connector to // determine if a given agent is allowed in this region // AS A ROOT AGENT. Returning false here will prevent them -- cgit v1.1