aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorHomer Horwitz2008-12-19 21:06:07 +0000
committerHomer Horwitz2008-12-19 21:06:07 +0000
commit11d04562463764e3e5562794c79ba6ac63e3a473 (patch)
treee4a80398ab62181125ddf767742f61989ce7c6a7 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parent* refactor: move sound trigger from scene into sepearate SoundModule (diff)
downloadopensim-SC-11d04562463764e3e5562794c79ba6ac63e3a473.zip
opensim-SC-11d04562463764e3e5562794c79ba6ac63e3a473.tar.gz
opensim-SC-11d04562463764e3e5562794c79ba6ac63e3a473.tar.bz2
opensim-SC-11d04562463764e3e5562794c79ba6ac63e3a473.tar.xz
- Set acceleration and rotational velocity to 0, too
- Pull it up a bit, so the physics is notified of it, too, before being switched off.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 8905c18..c54f8f8 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1425,6 +1425,16 @@ if (m_shape != null) {
1425 PhysActor.delink(); 1425 PhysActor.delink();
1426 } 1426 }
1427 1427
1428 if (!UsePhysics)
1429 {
1430 // reset velocity to 0 on physics switch-off. Without that, the client thinks the
1431 // prim still has velocity and continues to interpolate its position along the old
1432 // velocity-vector.
1433 Velocity = new Vector3(0, 0, 0);
1434 Acceleration = new Vector3(0, 0, 0);
1435 AngularVelocity = new Vector3(0, 0, 0);
1436 }
1437
1428 PhysActor.IsPhysical = UsePhysics; 1438 PhysActor.IsPhysical = UsePhysics;
1429 1439
1430 1440
@@ -1450,13 +1460,6 @@ if (m_shape != null) {
1450 } 1460 }
1451 } 1461 }
1452 } 1462 }
1453
1454 if (!UsePhysics)
1455 {
1456 // reset velocity to 0. Without that, the client thinks the prim still has velocity and
1457 // continues to interpolate its position along the old velocity-vector.
1458 Velocity = new Vector3(0, 0, 0);
1459 }
1460 } 1463 }
1461 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 1464 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
1462 } 1465 }