From 33d32355a1712e53f402eab1aa4818712f6f5f2c Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 17 Jun 2008 17:23:00 +0000 Subject: * refactor: Remove largely duplicate code from SceneXmlLoader.CreatePrimFromXml2() --- OpenSim/Region/Environment/Scenes/Scene.cs | 5 +++++ OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 4 ++++ OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 ++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e274139..b39e08d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -79,7 +79,12 @@ namespace OpenSim.Region.Environment.Scenes private int m_timePhase = 24; private readonly Mutex updateLock; + + /// + /// Are we applying physics to any of the prims in this scene? + /// public bool m_physicalPrim; + public bool m_seeIntoRegionFromNeighbor; public int MaxUndoCount = 5; private int m_RestartTimerCounter; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index f750200..877f196 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1052,6 +1052,10 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.ScheduleFullUpdate(); } + /// + /// Apply physics to this group + /// + /// public void ApplyPhysics(bool m_physicalPrim) { lock (m_parts) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 42df746..85351f4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -494,8 +494,9 @@ namespace OpenSim.Region.Environment.Scenes return m_velocity; } - set { - + + set + { m_velocity = value; if (PhysActor != null) { @@ -505,7 +506,6 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); } } - } } @@ -913,9 +913,13 @@ namespace OpenSim.Region.Environment.Scenes return newobject; } + /// + /// Apply physics to this part. + /// + /// + /// public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) { - bool isPhysical = (((rootObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0) && m_physicalPrim); bool isPhantom = ((rootObjectFlags & (uint) LLObject.ObjectFlags.Phantom) != 0); -- cgit v1.1