aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index fae5316..b41153b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1129,6 +1129,11 @@ namespace OpenSim.Region.Physics.OdePlugin
1129 set { m_throttleUpdates = value; } 1129 set { m_throttleUpdates = value; }
1130 } 1130 }
1131 1131
1132 public override bool Stopped
1133 {
1134 get { return _zeroFlag; }
1135 }
1136
1132 public override PhysicsVector Position 1137 public override PhysicsVector Position
1133 { 1138 {
1134 get { return _position; } 1139 get { return _position; }
@@ -1233,12 +1238,13 @@ namespace OpenSim.Region.Physics.OdePlugin
1233 public override PhysicsVector RotationalVelocity 1238 public override PhysicsVector RotationalVelocity
1234 { 1239 {
1235 get { 1240 get {
1241 PhysicsVector pv = new PhysicsVector(0, 0, 0);
1236 if (_zeroFlag) 1242 if (_zeroFlag)
1237 return PhysicsVector.Zero; 1243 return pv;
1238 m_lastUpdateSent = false; 1244 m_lastUpdateSent = false;
1239 1245
1240 if (m_rotationalVelocity.IsIdentical(PhysicsVector.Zero, 0.2f)) 1246 if (m_rotationalVelocity.IsIdentical(pv, 0.2f))
1241 return PhysicsVector.Zero; 1247 return pv;
1242 1248
1243 return m_rotationalVelocity; 1249 return m_rotationalVelocity;
1244 } 1250 }
@@ -1261,7 +1267,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1261 public void UpdatePositionAndVelocity() 1267 public void UpdatePositionAndVelocity()
1262 { 1268 {
1263 // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! 1269 // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit!
1264 1270 PhysicsVector pv = new PhysicsVector(0, 0, 0);
1265 if (Body != (IntPtr) 0) 1271 if (Body != (IntPtr) 0)
1266 { 1272 {
1267 d.Vector3 vec = d.BodyGetPosition(Body); 1273 d.Vector3 vec = d.BodyGetPosition(Body);
@@ -1348,7 +1354,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1348 { 1354 {
1349 m_throttleUpdates = false; 1355 m_throttleUpdates = false;
1350 throttleCounter = 0; 1356 throttleCounter = 0;
1351 m_rotationalVelocity = PhysicsVector.Zero; 1357 m_rotationalVelocity = pv;
1352 base.RequestPhysicsterseUpdate(); 1358 base.RequestPhysicsterseUpdate();
1353 m_lastUpdateSent = true; 1359 m_lastUpdateSent = true;
1354 } 1360 }
@@ -1362,9 +1368,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1362 _velocity.X = vel.X; 1368 _velocity.X = vel.X;
1363 _velocity.Y = vel.Y; 1369 _velocity.Y = vel.Y;
1364 _velocity.Z = vel.Z; 1370 _velocity.Z = vel.Z;
1365 if (_velocity.IsIdentical(PhysicsVector.Zero, 0.5f)) 1371 if (_velocity.IsIdentical(pv, 0.5f))
1366 { 1372 {
1367 m_rotationalVelocity = PhysicsVector.Zero; 1373 m_rotationalVelocity = pv;
1368 } 1374 }
1369 else 1375 else
1370 { 1376 {