mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user