aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2008-10-16 12:57:29 +0000
committerTeravus Ovares2008-10-16 12:57:29 +0000
commit68d85497adc328f8fda2fef52fb51f2c9bc7ece0 (patch)
tree58d10a1c83c71717f5073754aea04d15b8ea2280 /OpenSim
parentCheck for terrain size=256x256 on "terrain load <file>". This fixes (diff)
downloadopensim-SC-68d85497adc328f8fda2fef52fb51f2c9bc7ece0.zip
opensim-SC-68d85497adc328f8fda2fef52fb51f2c9bc7ece0.tar.gz
opensim-SC-68d85497adc328f8fda2fef52fb51f2c9bc7ece0.tar.bz2
opensim-SC-68d85497adc328f8fda2fef52fb51f2c9bc7ece0.tar.xz
* Releases the inter-region thread synchronization between physics in ODE on the same instance.
* If you are hosting many regions on a single instance, you will probably notice a decrease in region startup time and maybe a slight increase in performance. * Single regions won't notice anything different
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs8
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs3
3 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 2561fa5..9ad9318 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Physics.OdePlugin
147 } 147 }
148 CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); 148 CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor)));
149 149
150 lock (OdeScene.OdeLock) 150 lock (_parent_scene.OdeLock)
151 { 151 {
152 AvatarGeomAndBodyCreation(pos.X, pos.Y, pos.Z, m_tensor); 152 AvatarGeomAndBodyCreation(pos.X, pos.Y, pos.Z, m_tensor);
153 } 153 }
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Physics.OdePlugin
362 get { return _position; } 362 get { return _position; }
363 set 363 set
364 { 364 {
365 lock (OdeScene.OdeLock) 365 lock (_parent_scene.OdeLock)
366 { 366 {
367 d.BodySetPosition(Body, value.X, value.Y, value.Z); 367 d.BodySetPosition(Body, value.X, value.Y, value.Z);
368 _position = value; 368 _position = value;
@@ -386,7 +386,7 @@ namespace OpenSim.Region.Physics.OdePlugin
386 set 386 set
387 { 387 {
388 m_pidControllerActive = true; 388 m_pidControllerActive = true;
389 lock (OdeScene.OdeLock) 389 lock (_parent_scene.OdeLock)
390 { 390 {
391 d.JointDestroy(Amotor); 391 d.JointDestroy(Amotor);
392 392
@@ -863,7 +863,7 @@ namespace OpenSim.Region.Physics.OdePlugin
863 /// </summary> 863 /// </summary>
864 public void Destroy() 864 public void Destroy()
865 { 865 {
866 lock (OdeScene.OdeLock) 866 lock (_parent_scene.OdeLock)
867 { 867 {
868 // Kill the Amotor 868 // Kill the Amotor
869 d.JointDestroy(Amotor); 869 d.JointDestroy(Amotor);
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index a2c0c6b..452317a 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -990,7 +990,7 @@ namespace OpenSim.Region.Physics.OdePlugin
990 } 990 }
991 991
992 992
993 lock (OdeScene.OdeLock) 993 lock (_parent_scene.OdeLock)
994 { 994 {
995 CreateGeom(m_targetSpace, _mesh); 995 CreateGeom(m_targetSpace, _mesh);
996 996
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 2676def..90285c2 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Physics.OdePlugin
242 // split static geometry collision handling into spaces of 30 meters 242 // split static geometry collision handling into spaces of 30 meters
243 public IntPtr[,] staticPrimspace; 243 public IntPtr[,] staticPrimspace;
244 244
245 public static Object OdeLock = new Object(); 245 public Object OdeLock;
246 246
247 public IMesher mesher; 247 public IMesher mesher;
248 248
@@ -259,6 +259,7 @@ namespace OpenSim.Region.Physics.OdePlugin
259 /// </summary> 259 /// </summary>
260 public OdeScene(CollisionLocker dode) 260 public OdeScene(CollisionLocker dode)
261 { 261 {
262 OdeLock = new Object();
262 ode = dode; 263 ode = dode;
263 nearCallback = near; 264 nearCallback = near;
264 triCallback = TriCallback; 265 triCallback = TriCallback;