aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs12
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs3
3 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index c94a57d..a745d9c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -580,11 +580,17 @@ namespace OpenSim.Region.Environment.Scenes
580 580
581 public void applyImpulse(PhysicsVector impulse) 581 public void applyImpulse(PhysicsVector impulse)
582 { 582 {
583 // We check if rootpart is null here because scripts don't delete if you delete the host.
584 // This means that unfortunately, we can pass a null physics actor to Simulate!
585 // Make sure we don't do that!
583 SceneObjectPart rootpart = m_rootPart; 586 SceneObjectPart rootpart = m_rootPart;
584 if (m_rootPart.PhysActor != null) 587 if (rootpart != null)
585 { 588 {
586 m_rootPart.PhysActor.AddForce(impulse); 589 if (rootpart.PhysActor != null)
587 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 590 {
591 rootpart.PhysActor.AddForce(impulse);
592 m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
593 }
588 } 594 }
589 } 595 }
590 596
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index adb53d2..12d7694 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -429,6 +429,7 @@ namespace OpenSim.Region.Physics.OdePlugin
429 429
430 public void ProcessTaints(float timestep) 430 public void ProcessTaints(float timestep)
431 { 431 {
432 System.Threading.Thread.Sleep(5);
432 if (m_taintposition != _position) 433 if (m_taintposition != _position)
433 Move(timestep); 434 Move(timestep);
434 435
@@ -712,6 +713,7 @@ namespace OpenSim.Region.Physics.OdePlugin
712 713
713 public void changeAddForce(float timestamp) 714 public void changeAddForce(float timestamp)
714 { 715 {
716 System.Threading.Thread.Sleep(2);
715 lock (m_forcelist) 717 lock (m_forcelist)
716 { 718 {
717 //m_log.Info("[PHYSICS]: dequeing forcelist"); 719 //m_log.Info("[PHYSICS]: dequeing forcelist");
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index e58984b..f1d8232 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -639,6 +639,7 @@ namespace OpenSim.Region.Physics.OdePlugin
639 { 639 {
640 lock (OdeLock) 640 lock (OdeLock)
641 { 641 {
642 System.Threading.Thread.Sleep(20);
642 if (prim.IsPhysical) 643 if (prim.IsPhysical)
643 { 644 {
644 prim.disableBody(); 645 prim.disableBody();
@@ -733,7 +734,7 @@ namespace OpenSim.Region.Physics.OdePlugin
733 // never be called if the prim is physical(active) 734 // never be called if the prim is physical(active)
734 735
735 // All physical prim end up in the root space 736 // All physical prim end up in the root space
736 737 System.Threading.Thread.Sleep(20);
737 if (currentspace != space) 738 if (currentspace != space)
738 { 739 {
739 if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0) 740 if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0)