aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs34
1 files changed, 11 insertions, 23 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index e219535..72e9ca0 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -2160,7 +2160,6 @@ namespace OpenSim.Region.Physics.OdePlugin
2160 2160
2161 p.setPrimForRemoval(); 2161 p.setPrimForRemoval();
2162 AddPhysicsActorTaint(prim); 2162 AddPhysicsActorTaint(prim);
2163 //RemovePrimThreadLocked(p);
2164 } 2163 }
2165 } 2164 }
2166 } 2165 }
@@ -2607,15 +2606,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2607 2606
2608 /// <summary> 2607 /// <summary>
2609 /// Called after our prim properties are set Scale, position etc. 2608 /// Called after our prim properties are set Scale, position etc.
2609 /// </summary>
2610 /// <remarks>
2610 /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex 2611 /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex
2611 /// This assures us that we have no race conditions 2612 /// This assures us that we have no race conditions
2612 /// </summary> 2613 /// </remarks>
2613 /// <param name="prim"></param> 2614 /// <param name="actor"></param>
2614 public override void AddPhysicsActorTaint(PhysicsActor prim) 2615 public override void AddPhysicsActorTaint(PhysicsActor actor)
2615 { 2616 {
2616 if (prim is OdePrim) 2617 if (actor is OdePrim)
2617 { 2618 {
2618 OdePrim taintedprim = ((OdePrim) prim); 2619 OdePrim taintedprim = ((OdePrim)actor);
2619 lock (_taintedPrimLock) 2620 lock (_taintedPrimLock)
2620 { 2621 {
2621 if (!(_taintedPrimH.Contains(taintedprim))) 2622 if (!(_taintedPrimH.Contains(taintedprim)))
@@ -2627,11 +2628,10 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2627 _taintedPrimL.Add(taintedprim); // List for ordered readout 2628 _taintedPrimL.Add(taintedprim); // List for ordered readout
2628 } 2629 }
2629 } 2630 }
2630 return;
2631 } 2631 }
2632 else if (prim is OdeCharacter) 2632 else if (actor is OdeCharacter)
2633 { 2633 {
2634 OdeCharacter taintedchar = ((OdeCharacter)prim); 2634 OdeCharacter taintedchar = ((OdeCharacter)actor);
2635 lock (_taintedActors) 2635 lock (_taintedActors)
2636 { 2636 {
2637 if (!(_taintedActors.Contains(taintedchar))) 2637 if (!(_taintedActors.Contains(taintedchar)))
@@ -2734,29 +2734,18 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2734 { 2734 {
2735 try 2735 try
2736 { 2736 {
2737 // Insert, remove Characters
2738 bool processedtaints = false;
2739
2740 lock (_taintedActors) 2737 lock (_taintedActors)
2741 { 2738 {
2742 if (_taintedActors.Count > 0) 2739 if (_taintedActors.Count > 0)
2743 { 2740 {
2744 foreach (OdeCharacter character in _taintedActors) 2741 foreach (OdeCharacter character in _taintedActors)
2745 {
2746 character.ProcessTaints(); 2742 character.ProcessTaints();
2747 2743
2748 processedtaints = true; 2744 if (_taintedActors.Count > 0)
2749 //character.m_collisionscore = 0;
2750 }
2751
2752 if (processedtaints)
2753 _taintedActors.Clear(); 2745 _taintedActors.Clear();
2754 } 2746 }
2755 } 2747 }
2756 2748
2757 // Modify other objects in the scene.
2758 processedtaints = false;
2759
2760 lock (_taintedPrimLock) 2749 lock (_taintedPrimLock)
2761 { 2750 {
2762 foreach (OdePrim prim in _taintedPrimL) 2751 foreach (OdePrim prim in _taintedPrimL)
@@ -2772,7 +2761,6 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2772 prim.ProcessTaints(); 2761 prim.ProcessTaints();
2773 } 2762 }
2774 2763
2775 processedtaints = true;
2776 prim.m_collisionscore = 0; 2764 prim.m_collisionscore = 0;
2777 2765
2778 // This loop can block up the Heartbeat for a very long time on large regions. 2766 // This loop can block up the Heartbeat for a very long time on large regions.
@@ -2785,7 +2773,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2785 if (SupportsNINJAJoints) 2773 if (SupportsNINJAJoints)
2786 SimulatePendingNINJAJoints(); 2774 SimulatePendingNINJAJoints();
2787 2775
2788 if (processedtaints) 2776 if (_taintedPrimL.Count > 0)
2789 { 2777 {
2790//Console.WriteLine("Simulate calls Clear of _taintedPrim list"); 2778//Console.WriteLine("Simulate calls Clear of _taintedPrim list");
2791 _taintedPrimH.Clear(); 2779 _taintedPrimH.Clear();