From 3843efe478ed682fd08bf12ea8bd7377c68a36fb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 15 Oct 2011 02:42:43 +0100 Subject: Restore [Startup] physical_prim flag which can stop any prims being subject to physics This had stopped working. However, at the moment it still allows the physics flag to be set even though this has no effect. This needs to be fixed. Default for this flag is true as previously. --- OpenSim/Framework/ConfigSettings.cs | 6 ++++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs index b0bdebe..6ee7fee 100644 --- a/OpenSim/Framework/ConfigSettings.cs +++ b/OpenSim/Framework/ConfigSettings.cs @@ -34,7 +34,13 @@ namespace OpenSim.Framework public bool See_into_region_from_neighbor { get; set; } public string StorageDll { get; set; } public string ClientstackDll { get; set; } + + /// + /// 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 PhysicalPrim { get; set; } + public string LibrariesXMLFile { get; set; } public const uint DefaultRegionHttpPort = 9000; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 05c9924..8ad35d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1551,7 +1551,9 @@ namespace OpenSim.Region.Framework.Scenes /// public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive, bool m_physicalPrim) { -// m_log.DebugFormat("[SCENE OBJECT PART]: Applying physics to {0} {1} {2}", Name, LocalId, UUID); +// m_log.DebugFormat( +// "[SCENE OBJECT PART]: Applying physics to {0} {1}, m_physicalPrim {2}", +// Name, LocalId, UUID, m_physicalPrim); bool isPhysical = (((rootObjectFlags & (uint) PrimFlags.Physics) != 0) && m_physicalPrim); bool isPhantom = ((rootObjectFlags & (uint) PrimFlags.Phantom) != 0); @@ -1816,6 +1818,9 @@ namespace OpenSim.Region.Framework.Scenes /// public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) { + if (!ParentGroup.Scene.m_physicalPrim && UsePhysics) + return; + if (IsJoint()) { DoPhysicsPropertyUpdateForNinjaJoint(UsePhysics, isNew); -- cgit v1.1