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
integration
Justin Clark-Casey (justincc) 2012-04-06 20:32:39 +01:00
parent 908cebbea8
commit 627efc172b
1 changed files with 4 additions and 1 deletions

View File

@ -2907,6 +2907,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Float llGetMass() public LSL_Float llGetMass()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (m_host.IsRoot)
return m_host.ParentGroup.GetMass();
else
return m_host.GetMass(); return m_host.GetMass();
} }