aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-11 00:08:18 +0000
committerTeravus Ovares2007-11-11 00:08:18 +0000
commitec77e1eb17f032458dbe93c0a1eab5aee604112f (patch)
tree002992e71a443d80b44ebcbf497dfe17ce7a1625 /OpenSim
parentremoved OdePlugin/Meshing directory (diff)
downloadopensim-SC_OLD-ec77e1eb17f032458dbe93c0a1eab5aee604112f.zip
opensim-SC_OLD-ec77e1eb17f032458dbe93c0a1eab5aee604112f.tar.gz
opensim-SC_OLD-ec77e1eb17f032458dbe93c0a1eab5aee604112f.tar.bz2
opensim-SC_OLD-ec77e1eb17f032458dbe93c0a1eab5aee604112f.tar.xz
* adds flag in OpenSim.ini for disabling physical prim. Look at OpenSim.ini.example in the bin folder for an example.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs13
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs2
7 files changed, 23 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 42f1b94..e3c326b 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -73,6 +73,7 @@ namespace OpenSim
73 protected List<RegionInfo> m_regionData = new List<RegionInfo>(); 73 protected List<RegionInfo> m_regionData = new List<RegionInfo>();
74 74
75 private bool m_verbose; 75 private bool m_verbose;
76 private bool m_physicalPrim;
76 private readonly string m_logFilename = ("region-console.log"); 77 private readonly string m_logFilename = ("region-console.log");
77 private bool m_permissions = false; 78 private bool m_permissions = false;
78 79
@@ -154,6 +155,7 @@ namespace OpenSim
154 config.Set("gridmode", false); 155 config.Set("gridmode", false);
155 config.Set("physics", "basicphysics"); 156 config.Set("physics", "basicphysics");
156 config.Set("verbose", true); 157 config.Set("verbose", true);
158 config.Set("physical_prim", true);
157 config.Set("serverside_object_permissions", false); 159 config.Set("serverside_object_permissions", false);
158 160
159 config.Set("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); 161 config.Set("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
@@ -213,6 +215,7 @@ namespace OpenSim
213 m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); 215 m_physicsEngine = startupConfig.GetString("physics", "basicphysics");
214 m_meshEngineName = startupConfig.GetString("meshing", "Meshmerizer"); 216 m_meshEngineName = startupConfig.GetString("meshing", "Meshmerizer");
215 m_verbose = startupConfig.GetBoolean("verbose", true); 217 m_verbose = startupConfig.GetBoolean("verbose", true);
218 m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
216 m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); 219 m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false);
217 220
218 m_storageDLL = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"); 221 m_storageDLL = startupConfig.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
@@ -365,7 +368,7 @@ namespace OpenSim
365 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); 368 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
366 return 369 return
367 new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, 370 new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer,
368 m_moduleLoader, m_dumpAssetsToFile); 371 m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim);
369 } 372 }
370 373
371 protected override void Initialize() 374 protected override void Initialize()
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,
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index e658688..ae2f5ad 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -44,8 +44,8 @@ namespace SimpleApp
44 44
45 public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, 45 public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
46 AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, 46 AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer,
47 ModuleLoader moduleLoader) 47 ModuleLoader moduleLoader, bool physicalPrim)
48 : base(regionInfo, authen, commsMan, sceneGridService, assetCach, storeMan, httpServer, moduleLoader, false) 48 : base(regionInfo, authen, commsMan, sceneGridService, assetCach, storeMan, httpServer, moduleLoader, false, true)
49 { 49 {
50 m_avatars = new List<Avatar>(); 50 m_avatars = new List<Avatar>();
51 } 51 }
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index 49fae93..73b8303 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -172,7 +172,7 @@ namespace SimpleApp
172 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); 172 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
173 return 173 return
174 new MyWorld(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, 174 new MyWorld(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer,
175 new ModuleLoader(m_log, m_config)); 175 new ModuleLoader(m_log, m_config), true);
176 } 176 }
177 177
178 protected override StorageManager CreateStorageManager(RegionInfo regionInfo) 178 protected override StorageManager CreateStorageManager(RegionInfo regionInfo)