aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-06 21:14:19 +0100
committerJustin Clark-Casey (justincc)2012-04-06 21:14:19 +0100
commitf2903db39009c7e62f6a07c545183b9588bff775 (patch)
tree7960717836df2d7011e5bb1d05386bd330827910 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMake llGetMass() return total mass of object when called on root prim. (diff)
downloadopensim-SC_OLD-f2903db39009c7e62f6a07c545183b9588bff775.zip
opensim-SC_OLD-f2903db39009c7e62f6a07c545183b9588bff775.tar.gz
opensim-SC_OLD-f2903db39009c7e62f6a07c545183b9588bff775.tar.bz2
opensim-SC_OLD-f2903db39009c7e62f6a07c545183b9588bff775.tar.xz
For llGetMass(), return the mass of the avatar is the object is attached.
As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass This is the mass as used by the physics engine (ODE or Bullet).
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 19dab32..a21c66f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3514,6 +3514,22 @@ namespace OpenSim.Region.Framework.Scenes
3514 }); 3514 });
3515 } 3515 }
3516 3516
3517 /// <summary>
3518 /// Gets the mass.
3519 /// </summary>
3520 /// <returns>
3521 /// The mass.
3522 /// </returns>
3523 public float GetMass()
3524 {
3525 PhysicsActor pa = PhysicsActor;
3526
3527 if (pa != null)
3528 return pa.Mass;
3529 else
3530 return 0;
3531 }
3532
3517 internal void PushForce(Vector3 impulse) 3533 internal void PushForce(Vector3 impulse)
3518 { 3534 {
3519 if (PhysicsActor != null) 3535 if (PhysicsActor != null)