diff options
author | Justin Clark-Casey (justincc) | 2012-04-06 20:32:39 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-06 20:32:39 +0100 |
commit | 627efc172bda961f888dd3191fd8e1c4885f46e3 (patch) | |
tree | 6545d452c65a20439c858c2c14264e123c93d455 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-627efc172bda961f888dd3191fd8e1c4885f46e3.zip opensim-SC-627efc172bda961f888dd3191fd8e1c4885f46e3.tar.gz opensim-SC-627efc172bda961f888dd3191fd8e1c4885f46e3.tar.bz2 opensim-SC-627efc172bda961f888dd3191fd8e1c4885f46e3.tar.xz |
Make llGetMass() return total mass of object when called on root prim.
As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass
Aims to resolve http://opensimulator.org/mantis/view.php?id=5954
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8d25a62..43b66f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2907,7 +2907,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2907 | public LSL_Float llGetMass() | 2907 | public LSL_Float llGetMass() |
2908 | { | 2908 | { |
2909 | m_host.AddScriptLPS(1); | 2909 | m_host.AddScriptLPS(1); |
2910 | return m_host.GetMass(); | 2910 | if (m_host.IsRoot) |
2911 | return m_host.ParentGroup.GetMass(); | ||
2912 | else | ||
2913 | return m_host.GetMass(); | ||
2911 | } | 2914 | } |
2912 | 2915 | ||
2913 | public void llCollisionFilter(string name, string id, int accept) | 2916 | public void llCollisionFilter(string name, string id, int accept) |