diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
4 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index f5e6f63..f840845 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -446,7 +446,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
446 | AddEntity(group); | 446 | AddEntity(group); |
447 | group.AbsolutePosition = pos; | 447 | group.AbsolutePosition = pos; |
448 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 448 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
449 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | 449 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim); |
450 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 450 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
451 | { | 451 | { |
452 | PrimitiveBaseShape pbs = rootPart.Shape; | 452 | PrimitiveBaseShape pbs = rootPart.Shape; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7e1bbfa..b4c8b68 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
68 | private int m_timeUpdateCount; | 68 | private int m_timeUpdateCount; |
69 | 69 | ||
70 | private readonly Mutex updateLock; | 70 | private readonly Mutex updateLock; |
71 | 71 | public bool m_physicalPrim; | |
72 | protected ModuleLoader m_moduleLoader; | 72 | protected ModuleLoader m_moduleLoader; |
73 | protected StorageManager m_storageManager; | 73 | protected StorageManager m_storageManager; |
74 | protected AgentCircuitManager m_authenticateHandler; | 74 | protected AgentCircuitManager m_authenticateHandler; |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
192 | 192 | ||
193 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 193 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
194 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, | 194 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, |
195 | ModuleLoader moduleLoader, bool dumpAssetsToFile) | 195 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim) |
196 | { | 196 | { |
197 | updateLock = new Mutex(false); | 197 | updateLock = new Mutex(false); |
198 | 198 | ||
@@ -207,6 +207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
207 | m_regionName = m_regInfo.RegionName; | 207 | m_regionName = m_regInfo.RegionName; |
208 | m_datastore = m_regInfo.DataStore; | 208 | m_datastore = m_regInfo.DataStore; |
209 | RegisterRegionWithComms(); | 209 | RegisterRegionWithComms(); |
210 | m_physicalPrim = physicalPrim; | ||
210 | 211 | ||
211 | m_LandManager = new LandManager(this, m_regInfo); | 212 | m_LandManager = new LandManager(this, m_regInfo); |
212 | m_estateManager = new EstateManager(this, m_regInfo); | 213 | m_estateManager = new EstateManager(this, m_regInfo); |
@@ -522,7 +523,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
522 | { | 523 | { |
523 | AddEntityFromStorage(prim); | 524 | AddEntityFromStorage(prim); |
524 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); | 525 | SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); |
525 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | 526 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); |
526 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 527 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
527 | rootPart.PhysActor = phyScene.AddPrimShape( | 528 | rootPart.PhysActor = phyScene.AddPrimShape( |
528 | rootPart.Name, | 529 | rootPart.Name, |
@@ -572,7 +573,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
572 | rootPart.ObjectFlags += (uint) LLObject.ObjectFlags.Phantom; | 573 | rootPart.ObjectFlags += (uint) LLObject.ObjectFlags.Phantom; |
573 | } | 574 | } |
574 | // if not phantom, add to physics | 575 | // if not phantom, add to physics |
575 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | 576 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); |
576 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) | 577 | if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) |
577 | rootPart.PhysActor = | 578 | rootPart.PhysActor = |
578 | phyScene.AddPrimShape( | 579 | phyScene.AddPrimShape( |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 7575fad..1604dad 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
770 | { | 770 | { |
771 | i += 46; | 771 | i += 46; |
772 | //IsLocked = (data[i++] != 0) ? true : false; | 772 | //IsLocked = (data[i++] != 0) ? true : false; |
773 | UsePhysics = (data[i++] != 0) ? true : false; | 773 | UsePhysics = ((data[i++] != 0) && m_parentGroup.m_scene.m_physicalPrim) ? true : false; |
774 | //System.Console.WriteLine("U" + packet.ToBytes().Length.ToString()); | 774 | //System.Console.WriteLine("U" + packet.ToBytes().Length.ToString()); |
775 | IsTemporary = (data[i++] != 0) ? true : false; | 775 | IsTemporary = (data[i++] != 0) ? true : false; |
776 | IsPhantom = (data[i++] != 0) ? true : false; | 776 | IsPhantom = (data[i++] != 0) ? true : false; |
@@ -782,7 +782,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
782 | //Silently ignore it - TODO: FIXME Quick | 782 | //Silently ignore it - TODO: FIXME Quick |
783 | } | 783 | } |
784 | 784 | ||
785 | if (UsePhysics) | 785 | if (UsePhysics ) |
786 | { | 786 | { |
787 | AddFlag(LLObject.ObjectFlags.Physics); | 787 | AddFlag(LLObject.ObjectFlags.Physics); |
788 | if (PhysActor != null) | 788 | if (PhysActor != null) |
@@ -791,9 +791,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
791 | } | 791 | } |
792 | else | 792 | else |
793 | { | 793 | { |
794 | RemFlag(LLObject.ObjectFlags.Physics); | 794 | if (m_parentGroup.m_scene.m_physicalPrim) |
795 | if (PhysActor != null) | 795 | { |
796 | PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; | 796 | RemFlag(LLObject.ObjectFlags.Physics); |
797 | if (PhysActor != null) | ||
798 | PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; | ||
799 | } | ||
797 | } | 800 | } |
798 | 801 | ||
799 | if (IsPhantom) | 802 | if (IsPhantom) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index e0ddec5..c2bb019 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
44 | m_innerScene.AddEntity(obj); | 44 | m_innerScene.AddEntity(obj); |
45 | 45 | ||
46 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 46 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
47 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | 47 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); |
48 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 48 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
49 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( | 49 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( |
50 | rootPart.Name, | 50 | rootPart.Name, |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
110 | m_innerScene.AddEntityFromStorage(obj); | 110 | m_innerScene.AddEntityFromStorage(obj); |
111 | 111 | ||
112 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 112 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
113 | bool UsePhysics = ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0); | 113 | bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_parentScene.m_physicalPrim); |
114 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) | 114 | if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) |
115 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( | 115 | rootPart.PhysActor = m_innerScene.PhyScene.AddPrimShape( |
116 | rootPart.Name, | 116 | rootPart.Name, |