aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs5
-rw-r--r--bin/OpenSimDefaults.ini5
3 files changed, 18 insertions, 1 deletions
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
79 /// </summary> 79 /// </summary>
80 public bool m_physicalPrim; 80 public bool m_physicalPrim;
81 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; }
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;
84 public bool m_clampPrimSize; 92 public bool m_clampPrimSize;
@@ -651,6 +659,7 @@ namespace OpenSim.Region.Framework.Scenes
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 m_physicalPrim = 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)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b29ecc6..8fd136d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1473,6 +1473,9 @@ namespace OpenSim.Region.Framework.Scenes
1473 /// <param name="VolumeDetectActive"></param> 1473 /// <param name="VolumeDetectActive"></param>
1474 public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive) 1474 public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive)
1475 { 1475 {
1476 if (!ParentGroup.Scene.CollidablePrims)
1477 return;
1478
1476// m_log.DebugFormat( 1479// m_log.DebugFormat(
1477// "[SCENE OBJECT PART]: Applying physics to {0} {1}, m_physicalPrim {2}", 1480// "[SCENE OBJECT PART]: Applying physics to {0} {1}, m_physicalPrim {2}",
1478// Name, LocalId, UUID, m_physicalPrim); 1481// Name, LocalId, UUID, m_physicalPrim);
@@ -4318,7 +4321,7 @@ namespace OpenSim.Region.Framework.Scenes
4318 if (ParentGroup.Scene == null) 4321 if (ParentGroup.Scene == null)
4319 return; 4322 return;
4320 4323
4321 if (PhysActor == null) 4324 if (ParentGroup.Scene.CollidablePrims && PhysActor == null)
4322 { 4325 {
4323 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4326 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4324 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape( 4327 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 972efe4..3e7f8a6 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -181,6 +181,11 @@
181 ; ## PHYSICS 181 ; ## PHYSICS
182 ; ## 182 ; ##
183 183
184 ; If true then prims can be collided with by avatars, other prims, etc.
185 ; If false then all prims are phantom, no matter whether their phantom flag is checked or unchecked.
186 ; Also, no prims are subject to physics.
187 collidable_prim = true
188
184 ; If true then prims can be made subject to physics (gravity, pushing, etc.). 189 ; If true then prims can be made subject to physics (gravity, pushing, etc.).
185 ; If false then physics flag can be set but it is not honoured. However, prims are still solid for the purposes of collision direction 190 ; If false then physics flag can be set but it is not honoured. However, prims are still solid for the purposes of collision direction
186 physical_prim = true 191 physical_prim = true