From 443fc60cdf399a49832e787ca58c2644bef7e457 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 1 Apr 2017 17:49:17 +0100 Subject: store the physics inertia override in Mysql and add it to serializer. run prebuild is required --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index bf0e31b..46b7b86 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -406,6 +406,8 @@ namespace OpenSim.Region.Framework.Scenes private SOPVehicle m_vehicleParams = null; + private PhysicsInertiaData m_physicsInertia; + public KeyframeMotion KeyframeMotion { get; set; @@ -3548,6 +3550,18 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter Force = force; } + public PhysicsInertiaData PhysicsInertia + { + get + { + return m_physicsInertia; + } + set + { + m_physicsInertia = value; + } + } + public SOPVehicle VehicleParams { get @@ -4748,8 +4762,13 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter if (VolumeDetectActive) // change if not the default only pa.SetVolumeDetect(1); + + bool isroot = (m_localId == ParentGroup.RootPart.LocalId); + + if(isroot && m_physicsInertia != null) + pa.SetInertiaData(m_physicsInertia); - if (m_vehicleParams != null && m_localId == ParentGroup.RootPart.LocalId) + if (isroot && m_vehicleParams != null ) { m_vehicleParams.SetVehicle(pa); if(isPhysical && !isPhantom && m_vehicleParams.CameraDecoupled) -- cgit v1.1