Mantis 6028 osAvatarStopAnimation not stopping animations via UUID
Corrected to stop animations using the animation UUID similar to llStopAnimation. See http://opensimulator.org/wiki/OsAvatarStopAnimation0.7.3-extended
parent
58dc175ae3
commit
2021a8aedb
|
@ -955,7 +955,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
ScenePresence target = (ScenePresence)World.Entities[avatarID];
|
ScenePresence target = (ScenePresence)World.Entities[avatarID];
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
UUID animID = UUID.Zero;
|
UUID animID = new UUID();
|
||||||
|
if (!UUID.TryParse(animation, out animID))
|
||||||
|
{
|
||||||
|
animID = UUID.Zero;
|
||||||
lock (m_host.TaskInventory)
|
lock (m_host.TaskInventory)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||||
|
@ -968,6 +971,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (animID == UUID.Zero)
|
if (animID == UUID.Zero)
|
||||||
target.Animator.RemoveAnimation(animation);
|
target.Animator.RemoveAnimation(animation);
|
||||||
|
|
Loading…
Reference in New Issue