let objects use default animations
parent
fde3727453
commit
8cebc84de7
|
@ -4195,14 +4195,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// Do NOT try to parse UUID, animations cannot be triggered by ID
|
// Do NOT try to parse UUID, animations cannot be triggered by ID
|
||||||
UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
|
UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
|
||||||
if (animID == UUID.Zero)
|
if (animID == UUID.Zero)
|
||||||
return;
|
animID = DefaultAvatarAnimations.GetDefaultAnimation(anim);
|
||||||
m_host.AddAnimation(animID, anim);
|
if (animID != UUID.Zero)
|
||||||
|
m_host.AddAnimation(animID, anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llStopObjectAnimation(string anim)
|
public void llStopObjectAnimation(string anim)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation);
|
UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation);
|
||||||
|
if (animID == UUID.Zero)
|
||||||
|
animID = DefaultAvatarAnimations.GetDefaultAnimation(anim);
|
||||||
if (animID != UUID.Zero)
|
if (animID != UUID.Zero)
|
||||||
m_host.RemoveAnimation(animID);
|
m_host.RemoveAnimation(animID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue