Make vehicles retain velocity when crossing between regions.
parent
8f8206f478
commit
d6b8febbf4
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue