mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Make vehicles retain velocity when crossing between regions.
This commit is contained in:
@@ -1539,6 +1539,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||||||
// or flexible
|
// or flexible
|
||||||
if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
|
if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
|
||||||
{
|
{
|
||||||
|
Vector3 velocity = Velocity;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
|
PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
|
||||||
@@ -1570,6 +1571,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||||||
DoPhysicsPropertyUpdate(RigidBody, true);
|
DoPhysicsPropertyUpdate(RigidBody, true);
|
||||||
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
|
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
|
||||||
|
|
||||||
|
Velocity = velocity;
|
||||||
|
PhysActor.Velocity = velocity;
|
||||||
|
|
||||||
if (!building)
|
if (!building)
|
||||||
PhysActor.Building = false;
|
PhysActor.Building = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user