aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-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 }