From 528cc8136e567b5bac583728fbb0235baaba2f02 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 15 Oct 2011 02:54:43 +0100
Subject: fetch physical_prim switch from [Startup] config from inside scene,
as is done for most other scene config params
---
OpenSim/Framework/ConfigSettings.cs | 7 ++--
OpenSim/Region/Application/ConfigurationLoader.cs | 1 -
OpenSim/Region/Application/OpenSimBase.cs | 2 +-
OpenSim/Region/Framework/Scenes/Scene.cs | 13 ++++---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 42 +++++-----------------
OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 2 +-
OpenSim/Tests/Common/Mock/TestScene.cs | 4 +--
7 files changed, 23 insertions(+), 48 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs
index 6ee7fee..2768f70 100644
--- a/OpenSim/Framework/ConfigSettings.cs
+++ b/OpenSim/Framework/ConfigSettings.cs
@@ -35,12 +35,9 @@ namespace OpenSim.Framework
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/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index d19852b..b496108 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -362,7 +362,6 @@ namespace OpenSim
{
m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
- m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true);
m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index e867bc2..19329dd 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -659,7 +659,7 @@ namespace OpenSim
return new Scene(
regionInfo, circuitManager, sceneGridService,
- simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim,
+ simDataService, estateDataService, m_moduleLoader, false,
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a6ffe6e..7295a38 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -73,8 +73,12 @@ namespace OpenSim.Region.Framework.Scenes
public List SouthBorders = new List();
public List WestBorders = new List();
- /// Are we applying physics to any of the prims in this scene?
+ ///
+ /// 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 float m_maxNonphys = 256;
public float m_maxPhys = 10;
public bool m_clampPrimSize;
@@ -533,7 +537,7 @@ namespace OpenSim.Region.Framework.Scenes
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
SceneCommunicationService sceneGridService,
ISimulationDataService simDataService, IEstateDataService estateDataService,
- ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
+ ModuleLoader moduleLoader, bool dumpAssetsToFile,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: this(regInfo)
{
@@ -550,8 +554,7 @@ namespace OpenSim.Region.Framework.Scenes
m_EstateDataService = estateDataService;
m_regionHandle = m_regInfo.RegionHandle;
m_regionName = m_regInfo.RegionName;
-
- m_physicalPrim = physicalPrim;
+
m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
@@ -676,6 +679,8 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: Change default to true once the feature is supported
m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
+ m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
+
m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
if (RegionInfo.NonphysPrimMax > 0)
{
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b4a178e..42cc1ce 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -129,20 +129,15 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
public bool AllowedDrop;
-
public bool DIE_AT_EDGE;
-
public bool RETURN_AT_EDGE;
-
public bool BlockGrab;
-
public bool StatusSandbox;
-
public Vector3 StatusSandboxPos;
[XmlIgnore]
@@ -165,41 +160,29 @@ namespace OpenSim.Region.Framework.Scenes
// for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script)
public UUID Sound;
-
-
+
public byte SoundFlags;
-
-
+
public double SoundGain;
-
-
+
public double SoundRadius;
-
-
+
public uint TimeStampFull;
-
-
+
public uint TimeStampLastActivity; // Will be used for AutoReturn
-
-
- public uint TimeStampTerse;
+ public uint TimeStampTerse;
public UUID FromItemID;
-
public UUID FromFolderID;
-
public int STATUS_ROTATE_X;
-
public int STATUS_ROTATE_Y;
-
public int STATUS_ROTATE_Z;
-
-
+
private Dictionary m_CollisionFilter = new Dictionary();
///
@@ -216,35 +199,26 @@ namespace OpenSim.Region.Framework.Scenes
public scriptEvents AggregateScriptEvents;
-
public Vector3 AttachedPos;
-
public Vector3 RotationAxis = Vector3.One;
-
public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this
// Certainly this must be a persistant setting finally
-
public bool IsWaitingForFirstSpinUpdatePacket;
-
public Quaternion SpinOldOrientation = Quaternion.Identity;
-
public Quaternion m_APIDTarget = Quaternion.Identity;
-
public float m_APIDDamp = 0;
-
public float m_APIDStrength = 0;
///
/// This part's inventory
- ///
-
+ ///
public IEntityInventory Inventory
{
get { return m_inventory; }
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index ea433a6..c64270f 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Tests.Common
IConfigSource configSource = new IniConfigSource();
TestScene testScene = new TestScene(
- regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
+ regInfo, acm, scs, simDataService, estateDataService, null, false, false, configSource, null);
IRegionModule godsModule = new GodsModule();
godsModule.Initialise(testScene, new IniConfigSource());
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 0e1433a..f0e65c5 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -41,10 +41,10 @@ namespace OpenSim.Tests.Common.Mock
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
- ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
+ ModuleLoader moduleLoader, bool dumpAssetsToFile,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, sceneGridService, simDataService, estateDataService, moduleLoader,
- dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
+ dumpAssetsToFile, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
--
cgit v1.1