aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-09 16:32:44 +0000
committerTeravus Ovares2008-03-09 16:32:44 +0000
commit5b6eba968b25dae5c58b760990e1f0969b9c9193 (patch)
treeaa297ef34ccf22e2b8e12bdc17db5f98f78c115f /OpenSim/Region/Physics/OdePlugin
parent* Cleaned up some locking on the ODEPlugin to make it more developer friendly (diff)
downloadopensim-SC_OLD-5b6eba968b25dae5c58b760990e1f0969b9c9193.zip
opensim-SC_OLD-5b6eba968b25dae5c58b760990e1f0969b9c9193.tar.gz
opensim-SC_OLD-5b6eba968b25dae5c58b760990e1f0969b9c9193.tar.bz2
opensim-SC_OLD-5b6eba968b25dae5c58b760990e1f0969b9c9193.tar.xz
* Fixed the Link + Duplicate + Unlink both = 'ODE Invalid Argument in Collision Space Crash'
* Added: Console comment: [PHYSICS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs58
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs8
2 files changed, 39 insertions, 27 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 8a8a5fb..3adf773 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -696,45 +696,51 @@ namespace OpenSim.Region.Physics.OdePlugin
696 public void ProcessTaints(float timestep) 696 public void ProcessTaints(float timestep)
697 { 697 {
698 698
699 699
700 if (m_taintadd) 700 if (m_taintadd)
701 { 701 {
702 changeadd(timestep); 702 changeadd(timestep);
703 } 703 }
704 if (prim_geom != (IntPtr)0)
705 {
706 if (m_taintposition != _position)
707 Move(timestep);
704 708
705 if (m_taintposition != _position) 709 if (m_taintrot != _orientation)
706 Move(timestep); 710 rotate(timestep);
707 711 //
708 if (m_taintrot != _orientation)
709 rotate(timestep);
710 //
711 712
712 if (m_taintPhysics != m_isphysical) 713 if (m_taintPhysics != m_isphysical)
713 changePhysicsStatus(timestep); 714 changePhysicsStatus(timestep);
714 // 715 //
715 716
716 if (m_taintsize != _size) 717 if (m_taintsize != _size)
717 changesize(timestep); 718 changesize(timestep);
718 // 719 //
719 720
720 if (m_taintshape) 721 if (m_taintshape)
721 changeshape(timestep); 722 changeshape(timestep);
722 // 723 //
723 724
724 if (m_taintforce) 725 if (m_taintforce)
725 changeAddForce(timestep); 726 changeAddForce(timestep);
726 727
727 if (m_taintdisable) 728 if (m_taintdisable)
728 changedisable(timestep); 729 changedisable(timestep);
729 730
730 if (m_taintselected != m_isSelected) 731 if (m_taintselected != m_isSelected)
731 changeSelectedStatus(timestep); 732 changeSelectedStatus(timestep);
732 733
733 if (m_taintVelocity != PhysicsVector.Zero) 734 if (m_taintVelocity != PhysicsVector.Zero)
734 changevelocity(timestep); 735 changevelocity(timestep);
735 736
736 if (m_taintparent != _parent) 737 if (m_taintparent != _parent)
737 changelink(timestep); 738 changelink(timestep);
739 }
740 else
741 {
742 m_log.Error("[PHYISCS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil.");
743 }
738 } 744 }
739 745
740 private void changelink(float timestep) 746 private void changelink(float timestep)
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 5b1fd78..fc71802 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -238,7 +238,8 @@ namespace OpenSim.Region.Physics.OdePlugin
238 238
239 internal void waitForSpaceUnlock(IntPtr space) 239 internal void waitForSpaceUnlock(IntPtr space)
240 { 240 {
241 while (d.SpaceLockQuery(space)){ } // Wait and do nothing 241 if (space != (IntPtr)0)
242 while (d.SpaceLockQuery(space)){ } // Wait and do nothing
242 } 243 }
243 244
244 /// <summary> 245 /// <summary>
@@ -1014,6 +1015,11 @@ namespace OpenSim.Region.Physics.OdePlugin
1014 System.Threading.Thread.Sleep(20); 1015 System.Threading.Thread.Sleep(20);
1015 if (currentspace != space) 1016 if (currentspace != space)
1016 { 1017 {
1018 m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString());
1019 if (currentspace == (IntPtr) 0)
1020 {
1021 int adfadf = 0;
1022 }
1017 if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0) 1023 if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0)
1018 { 1024 {
1019 if (d.GeomIsSpace(currentspace)) 1025 if (d.GeomIsSpace(currentspace))