aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs46
1 files changed, 31 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6666328..0f84da9 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -77,7 +77,15 @@ namespace OpenSim.Region.Framework.Scenes
77 /// Controls whether physics can be applied to prims. Even if false, prims still have entries in a 77 /// Controls whether physics can be applied to prims. Even if false, prims still have entries in a
78 /// PhysicsScene in order to perform collision detection 78 /// PhysicsScene in order to perform collision detection
79 /// </summary> 79 /// </summary>
80 public bool m_physicalPrim; 80 public bool PhysicalPrims { get; private set; }
81
82 /// <summary>
83 /// Controls whether prims can be collided with.
84 /// </summary>
85 /// <remarks>
86 /// If this is set to false then prims cannot be subject to physics either.
87 /// </summary>
88 public bool CollidablePrims { get; private set; }
81 89
82 public float m_maxNonphys = 256; 90 public float m_maxNonphys = 256;
83 public float m_maxPhys = 10; 91 public float m_maxPhys = 10;
@@ -650,7 +658,8 @@ namespace OpenSim.Region.Framework.Scenes
650 //Animation states 658 //Animation states
651 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 659 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
652 660
653 m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); 661 PhysicalPrims = startupConfig.GetBoolean("physical_prim", true);
662 CollidablePrims = startupConfig.GetBoolean("collidable_prim", true);
654 663
655 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 664 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
656 if (RegionInfo.NonphysPrimMax > 0) 665 if (RegionInfo.NonphysPrimMax > 0)
@@ -701,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
701 if (maptileRefresh != 0) 710 if (maptileRefresh != 0)
702 { 711 {
703 m_mapGenerationTimer.Interval = maptileRefresh * 1000; 712 m_mapGenerationTimer.Interval = maptileRefresh * 1000;
704 m_mapGenerationTimer.Elapsed += RegenerateMaptile; 713 m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister;
705 m_mapGenerationTimer.AutoReset = true; 714 m_mapGenerationTimer.AutoReset = true;
706 m_mapGenerationTimer.Start(); 715 m_mapGenerationTimer.Start();
707 } 716 }
@@ -1638,21 +1647,17 @@ namespace OpenSim.Region.Framework.Scenes
1638 { 1647 {
1639 m_sceneGridService.SetScene(this); 1648 m_sceneGridService.SetScene(this);
1640 1649
1650 //// Unfortunately this needs to be here and it can't be async.
1651 //// The map tile image is stored in RegionSettings, but it also needs to be
1652 //// stored in the GridService, because that's what the world map module uses
1653 //// to send the map image UUIDs (of other regions) to the viewer...
1654 if (m_generateMaptiles)
1655 RegenerateMaptile();
1656
1641 GridRegion region = new GridRegion(RegionInfo); 1657 GridRegion region = new GridRegion(RegionInfo);
1642 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 1658 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
1643 if (error != String.Empty) 1659 if (error != String.Empty)
1644 {
1645 throw new Exception(error); 1660 throw new Exception(error);
1646 }
1647
1648 // Generate the maptile asynchronously, because sometimes it can be very slow and we
1649 // don't want this to delay starting the region.
1650 if (m_generateMaptiles)
1651 {
1652 Util.FireAndForget(delegate {
1653 RegenerateMaptile(null, null);
1654 });
1655 }
1656 } 1661 }
1657 1662
1658 #endregion 1663 #endregion
@@ -5023,13 +5028,24 @@ namespace OpenSim.Region.Framework.Scenes
5023 /// </summary> 5028 /// </summary>
5024 /// <param name="sender"></param> 5029 /// <param name="sender"></param>
5025 /// <param name="e"></param> 5030 /// <param name="e"></param>
5026 public void RegenerateMaptile(object sender, ElapsedEventArgs e) 5031 private void RegenerateMaptile()
5027 { 5032 {
5028 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); 5033 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
5029 if (mapModule != null) 5034 if (mapModule != null)
5030 mapModule.GenerateMaptile(); 5035 mapModule.GenerateMaptile();
5031 } 5036 }
5032 5037
5038 private void RegenerateMaptileAndReregister(object sender, ElapsedEventArgs e)
5039 {
5040 RegenerateMaptile();
5041
5042 // We need to propagate the new image UUID to the grid service
5043 // so that all simulators can retrieve it
5044 string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo));
5045 if (error != string.Empty)
5046 throw new Exception(error);
5047 }
5048
5033 // This method is called across the simulation connector to 5049 // This method is called across the simulation connector to
5034 // determine if a given agent is allowed in this region 5050 // determine if a given agent is allowed in this region
5035 // AS A ROOT AGENT. Returning false here will prevent them 5051 // AS A ROOT AGENT. Returning false here will prevent them