aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2012-04-29 01:33:40 +0200
committerMelanie2012-04-29 01:33:40 +0200
commit174fa4a70f2622c65ef8d9488765b71c1fad345e (patch)
tree42e4de081e8ab4f673235471a3b5daf626a8828b /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'master' into careminster (diff)
parent remove repeated set of group rotation to physics (diff)
downloadopensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.zip
opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.gz
opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.bz2
opensim-SC_OLD-174fa4a70f2622c65ef8d9488765b71c1fad345e.tar.xz
Merge branch 'avination'
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs40
1 files changed, 37 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 37b5554..ffb86f3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1865,7 +1865,7 @@ namespace OpenSim.Region.Framework.Scenes
1865 { 1865 {
1866 if ((!isPhantom || isPhysical || _VolumeDetectActive) && !ParentGroup.IsAttachment 1866 if ((!isPhantom || isPhysical || _VolumeDetectActive) && !ParentGroup.IsAttachment
1867 && !(Shape.PathCurve == (byte)Extrusion.Flexible)) 1867 && !(Shape.PathCurve == (byte)Extrusion.Flexible))
1868 AddToPhysics(isPhysical, isPhantom, building, true); 1868 AddToPhysics(isPhysical, isPhantom, building, isPhysical);
1869 else 1869 else
1870 PhysActor = null; // just to be sure 1870 PhysActor = null; // just to be sure
1871 } 1871 }
@@ -2311,7 +2311,7 @@ namespace OpenSim.Region.Framework.Scenes
2311 */ 2311 */
2312 } 2312 }
2313 2313
2314 public float GetMass() 2314 public float GetMass()
2315 { 2315 {
2316 PhysicsActor pa = PhysActor; 2316 PhysicsActor pa = PhysActor;
2317 2317
@@ -2321,6 +2321,40 @@ namespace OpenSim.Region.Framework.Scenes
2321 return 0; 2321 return 0;
2322 } 2322 }
2323 2323
2324 public Vector3 GetCenterOfMass()
2325 {
2326 if (ParentGroup.RootPart == this)
2327 {
2328 if (ParentGroup.IsDeleted)
2329 return AbsolutePosition;
2330 return ParentGroup.GetCenterOfMass();
2331 }
2332
2333 PhysicsActor pa = PhysActor;
2334
2335 if (pa != null)
2336 {
2337 Vector3 tmp = pa.CenterOfMass;
2338 return tmp;
2339 }
2340 else
2341 return AbsolutePosition;
2342 }
2343
2344 public Vector3 GetPartCenterOfMass()
2345 {
2346 PhysicsActor pa = PhysActor;
2347
2348 if (pa != null)
2349 {
2350 Vector3 tmp = pa.CenterOfMass;
2351 return tmp;
2352 }
2353 else
2354 return AbsolutePosition;
2355 }
2356
2357
2324 public Vector3 GetForce() 2358 public Vector3 GetForce()
2325 { 2359 {
2326 return Force; 2360 return Force;
@@ -4804,7 +4838,7 @@ namespace OpenSim.Region.Framework.Scenes
4804 { 4838 {
4805 Velocity = velocity; 4839 Velocity = velocity;
4806 AngularVelocity = rotationalVelocity; 4840 AngularVelocity = rotationalVelocity;
4807 pa.Velocity = velocity; 4841// pa.Velocity = velocity;
4808 pa.RotationalVelocity = rotationalVelocity; 4842 pa.RotationalVelocity = rotationalVelocity;
4809 4843
4810 // if not vehicle and root part apply force and torque 4844 // if not vehicle and root part apply force and torque