mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
add some LSL
This commit is contained in:
@@ -4224,6 +4224,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public void llStartObjectAnimation(string anim)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// Do NOT try to parse UUID, animations cannot be triggered by ID
|
||||
UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
|
||||
if (animID == UUID.Zero)
|
||||
return;
|
||||
m_host.AddAnimation(animID, anim);
|
||||
}
|
||||
|
||||
public void llStopObjectAnimation(string anim)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation);
|
||||
if (animID != UUID.Zero)
|
||||
m_host.RemoveAnimation(animID);
|
||||
}
|
||||
|
||||
public LSL_List llGetObjectAnimationNames()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
LSL_List ret = new LSL_List();
|
||||
|
||||
if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0)
|
||||
return ret;
|
||||
|
||||
foreach (string name in m_host.AnimationsNames.Values)
|
||||
ret.Add(new LSL_String(name));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void llPointAt(LSL_Vector pos)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
@@ -409,6 +409,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Float llSqrt(double f);
|
||||
void llStartAnimation(string anim);
|
||||
void llStopAnimation(string anim);
|
||||
void llStartObjectAnimation(string anim);
|
||||
void llStopObjectAnimation(string anim);
|
||||
LSL_List llGetObjectAnimationNames();
|
||||
void llStopHover();
|
||||
void llStopLookAt();
|
||||
void llStopMoveToTarget();
|
||||
|
||||
@@ -1836,6 +1836,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_LSL_Functions.llStopAnimation(anim);
|
||||
}
|
||||
|
||||
public void llStartObjectAnimation(string anim)
|
||||
{
|
||||
m_LSL_Functions.llStartObjectAnimation(anim);
|
||||
}
|
||||
|
||||
public void llStopObjectAnimation(string anim)
|
||||
{
|
||||
m_LSL_Functions.llStopObjectAnimation(anim);
|
||||
}
|
||||
|
||||
public LSL_List llGetObjectAnimationNames()
|
||||
{
|
||||
return m_LSL_Functions.llGetObjectAnimationNames();
|
||||
}
|
||||
|
||||
public void llStopHover()
|
||||
{
|
||||
m_LSL_Functions.llStopHover();
|
||||
|
||||
Reference in New Issue
Block a user