aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorMelanie2009-08-17 22:06:51 +0100
committerMelanie2009-08-17 22:06:51 +0100
commit9ad3e72ae1945d754417480a9f733f441d054371 (patch)
treeefd6d015cda72357b02e91e0a1f54a58b4f065a8 /OpenSim/Region/Physics
parentAdded some padding to the remote inventory connector so that it tries to oper... (diff)
downloadopensim-SC-9ad3e72ae1945d754417480a9f733f441d054371.zip
opensim-SC-9ad3e72ae1945d754417480a9f733f441d054371.tar.gz
opensim-SC-9ad3e72ae1945d754417480a9f733f441d054371.tar.bz2
opensim-SC-9ad3e72ae1945d754417480a9f733f441d054371.tar.xz
Did I say that i don't like git? Remove some stuff that shouldn't have
gone in.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs38
1 files changed, 8 insertions, 30 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 80d7598..b7030f1 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -156,10 +156,10 @@ namespace OpenSim.Region.Physics.OdePlugin
156 156
157 private const uint m_regionWidth = Constants.RegionSize; 157 private const uint m_regionWidth = Constants.RegionSize;
158 private const uint m_regionHeight = Constants.RegionSize; 158 private const uint m_regionHeight = Constants.RegionSize;
159 private bool IsLocked = false; 159
160 private float ODE_STEPSIZE = 0.020f; 160 private float ODE_STEPSIZE = 0.020f;
161 private float metersInSpace = 29.9f; 161 private float metersInSpace = 29.9f;
162 private List<PhysicsActor> RemoveQueue; 162
163 public float gravityx = 0f; 163 public float gravityx = 0f;
164 public float gravityy = 0f; 164 public float gravityy = 0f;
165 public float gravityz = -9.8f; 165 public float gravityz = -9.8f;
@@ -376,7 +376,6 @@ namespace OpenSim.Region.Physics.OdePlugin
376 // Initialize the mesh plugin 376 // Initialize the mesh plugin
377 public override void Initialise(IMesher meshmerizer, IConfigSource config) 377 public override void Initialise(IMesher meshmerizer, IConfigSource config)
378 { 378 {
379 RemoveQueue = new List<PhysicsActor>();
380 mesher = meshmerizer; 379 mesher = meshmerizer;
381 m_config = config; 380 m_config = config;
382 // Defaults 381 // Defaults
@@ -2048,21 +2047,13 @@ namespace OpenSim.Region.Physics.OdePlugin
2048 { 2047 {
2049 if (prim is OdePrim) 2048 if (prim is OdePrim)
2050 { 2049 {
2051 if (!IsLocked) //Fix a deadlock situation.. have we been locked by Simulate? 2050 lock (OdeLock)
2052 { 2051 {
2053 lock (OdeLock) 2052 OdePrim p = (OdePrim) prim;
2054 {
2055 OdePrim p = (OdePrim)prim;
2056 2053
2057 p.setPrimForRemoval(); 2054 p.setPrimForRemoval();
2058 AddPhysicsActorTaint(prim); 2055 AddPhysicsActorTaint(prim);
2059 //RemovePrimThreadLocked(p); 2056 //RemovePrimThreadLocked(p);
2060 }
2061 }
2062 else
2063 {
2064 //Add the prim to a queue which will be removed when Simulate has finished what it's doing.
2065 RemoveQueue.Add(prim);
2066 } 2057 }
2067 } 2058 }
2068 } 2059 }
@@ -2584,7 +2575,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2584 DeleteRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks 2575 DeleteRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
2585 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks 2576 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
2586 } 2577 }
2587 IsLocked = true; 2578
2588 lock (OdeLock) 2579 lock (OdeLock)
2589 { 2580 {
2590 // Process 10 frames if the sim is running normal.. 2581 // Process 10 frames if the sim is running normal..
@@ -2997,19 +2988,6 @@ namespace OpenSim.Region.Physics.OdePlugin
2997 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); 2988 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
2998 } 2989 }
2999 } 2990 }
3000 IsLocked = false;
3001 if (RemoveQueue.Count > 0)
3002 {
3003 do
3004 {
3005 if (RemoveQueue[0] != null)
3006 {
3007 RemovePrimThreadLocked((OdePrim)RemoveQueue[0]);
3008 }
3009 RemoveQueue.RemoveAt(0);
3010 }
3011 while (RemoveQueue.Count > 0);
3012 }
3013 2991
3014 return fps; 2992 return fps;
3015 } 2993 }