From d6b8febbf44e5aed73153129a4fa55c3fb10eee2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 20 Feb 2012 19:49:01 +0100 Subject: Make vehicles retain velocity when crossing between regions. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 613f9b5..d32b20a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1539,6 +1539,7 @@ namespace OpenSim.Region.Framework.Scenes // or flexible if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible)) { + Vector3 velocity = Velocity; try { PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape( @@ -1570,6 +1571,9 @@ namespace OpenSim.Region.Framework.Scenes DoPhysicsPropertyUpdate(RigidBody, true); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); + Velocity = velocity; + PhysActor.Velocity = velocity; + if (!building) PhysActor.Building = false; } -- cgit v1.1