aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-04-01 17:49:17 +0100
committerUbitUmarov2017-04-01 17:49:17 +0100
commit443fc60cdf399a49832e787ca58c2644bef7e457 (patch)
tree103b547e95ced12fbc22109b82ac692f92068002 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parent add missing file. Changes of inertia data of objects running does not (diff)
downloadopensim-SC_OLD-443fc60cdf399a49832e787ca58c2644bef7e457.zip
opensim-SC_OLD-443fc60cdf399a49832e787ca58c2644bef7e457.tar.gz
opensim-SC_OLD-443fc60cdf399a49832e787ca58c2644bef7e457.tar.bz2
opensim-SC_OLD-443fc60cdf399a49832e787ca58c2644bef7e457.tar.xz
store the physics inertia override in Mysql and add it to serializer. run prebuild is required
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 77658ef..719a5dd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -5037,20 +5037,22 @@ namespace OpenSim.Region.Framework.Scenes
5037 5037
5038 public void SetInertiaData(float TotalMass, Vector3 CenterOfMass, Vector3 Inertia, Vector4 aux ) 5038 public void SetInertiaData(float TotalMass, Vector3 CenterOfMass, Vector3 Inertia, Vector4 aux )
5039 { 5039 {
5040 PhysicsActor pa = RootPart.PhysActor; 5040 PhysicsInertiaData inertia = new PhysicsInertiaData();
5041 inertia.TotalMass = TotalMass;
5042 inertia.CenterOfMass = CenterOfMass;
5043 inertia.Inertia = Inertia;
5044 inertia.InertiaRotation = aux;
5045
5046 if(TotalMass < 0)
5047 RootPart.PhysicsInertia = null;
5048 else
5049 RootPart.PhysicsInertia = new PhysicsInertiaData(inertia);
5041 5050
5051 PhysicsActor pa = RootPart.PhysActor;
5042 if(pa !=null) 5052 if(pa !=null)
5043 {
5044 PhysicsInertiaData inertia = new PhysicsInertiaData();
5045 inertia.TotalMass = TotalMass;
5046 inertia.CenterOfMass = CenterOfMass;
5047 inertia.Inertia = Inertia;
5048 inertia.InertiaRotation = aux;
5049 pa.SetInertiaData(inertia); 5053 pa.SetInertiaData(inertia);
5050 }
5051 } 5054 }
5052 5055
5053
5054 /// <summary> 5056 /// <summary>
5055 /// Set the user group to which this scene object belongs. 5057 /// Set the user group to which this scene object belongs.
5056 /// </summary> 5058 /// </summary>