aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorDahlia Trimble2008-07-24 21:05:30 +0000
committerDahlia Trimble2008-07-24 21:05:30 +0000
commitc67198299efbe3bfcea4c7d9705bcf53c0f52bd3 (patch)
treee9946402701c15818995a83e22fb18f5a2381737 /OpenSim/Region/Physics/OdePlugin
parent* refactor: Remove now redundant inventory server url being passed to GetInve... (diff)
downloadopensim-SC_OLD-c67198299efbe3bfcea4c7d9705bcf53c0f52bd3.zip
opensim-SC_OLD-c67198299efbe3bfcea4c7d9705bcf53c0f52bd3.tar.gz
opensim-SC_OLD-c67198299efbe3bfcea4c7d9705bcf53c0f52bd3.tar.bz2
opensim-SC_OLD-c67198299efbe3bfcea4c7d9705bcf53c0f52bd3.tar.xz
Changed application of constant forces to after PID force is applied. llSetForce() should behave identical to the Linden implementation now.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index a4c0d79..c1e54da 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -750,7 +750,7 @@ namespace OpenSim.Region.Physics.OdePlugin
750 changeshape(timestep); 750 changeshape(timestep);
751 // 751 //
752 752
753 if (m_taintforce || m_force != new PhysicsVector(0.0f, 0.0f, 0.0f)) 753 if (m_taintforce)
754 changeAddForce(timestep); 754 changeAddForce(timestep);
755 755
756 if (m_taintdisable) 756 if (m_taintdisable)
@@ -1194,6 +1194,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1194 fy *= m_mass; 1194 fy *= m_mass;
1195 //fz *= m_mass; 1195 //fz *= m_mass;
1196 1196
1197 fx += m_force.X;
1198 fy += m_force.Y;
1199 fz += m_force.Z;
1200
1197 //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); 1201 //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString());
1198 if (fx != 0 || fy != 0 || fz != 0) 1202 if (fx != 0 || fy != 0 || fz != 0)
1199 { 1203 {
@@ -1752,8 +1756,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1752 //m_log.Info("[PHYSICS]: dequeing forcelist"); 1756 //m_log.Info("[PHYSICS]: dequeing forcelist");
1753 if (IsPhysical) 1757 if (IsPhysical)
1754 { 1758 {
1755 //PhysicsVector iforce = new PhysicsVector(); 1759 PhysicsVector iforce = new PhysicsVector();
1756 PhysicsVector iforce = m_force * 100.0f;
1757 for (int i = 0; i < m_forcelist.Count; i++) 1760 for (int i = 0; i < m_forcelist.Count; i++)
1758 { 1761 {
1759 iforce = iforce + (m_forcelist[i] * 100); 1762 iforce = iforce + (m_forcelist[i] * 100);
@@ -1767,6 +1770,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1767 m_collisionscore = 0; 1770 m_collisionscore = 0;
1768 m_interpenetrationcount = 0; 1771 m_interpenetrationcount = 0;
1769 } 1772 }
1773
1770 m_taintforce = false; 1774 m_taintforce = false;
1771 1775
1772 } 1776 }