Add llGetPhysicsMaterial

avinationmerge
Melanie 2013-05-04 00:44:47 +02:00
parent d982d24938
commit 4904d40138
3 changed files with 18 additions and 0 deletions

View File

@ -7851,6 +7851,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
public LSL_List llGetPhysicsMaterial()
{
LSL_List result = new LSL_List();
result.Add(new LSL_Float(m_host.GravityModifier));
result.Add(new LSL_Float(m_host.Restitution));
result.Add(new LSL_Float(m_host.Friction));
result.Add(new LSL_Float(m_host.Density));
return result;
}
private void SetPhysicsMaterial(SceneObjectPart part, int material_bits, private void SetPhysicsMaterial(SceneObjectPart part, int material_bits,
float material_density, float material_friction, float material_density, float material_friction,
float material_restitution, float material_gravity_modifier) float material_restitution, float material_gravity_modifier)

View File

@ -433,5 +433,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc); void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc);
void llSetKeyframedMotion(LSL_List frames, LSL_List options); void llSetKeyframedMotion(LSL_List frames, LSL_List options);
LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
LSL_List llGetPhysicsMaterial();
} }
} }

View File

@ -2009,5 +2009,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{ {
m_LSL_Functions.llSetPhysicsMaterial(material_bits, material_gravity_modifier, material_restitution, material_friction, material_density); m_LSL_Functions.llSetPhysicsMaterial(material_bits, material_gravity_modifier, material_restitution, material_friction, material_density);
} }
public LSL_List llGetPhysicsMaterial()
{
return m_LSL_Functions.llGetPhysicsMaterial();
}
} }
} }