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,7 +2907,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Float llGetMass()
{
m_host.AddScriptLPS(1);
return m_host.GetMass();
if (m_host.IsRoot)
return m_host.ParentGroup.GetMass();
else
return m_host.GetMass();
}
public void llCollisionFilter(string name, string id, int accept)