mirror of
https://github.com/opensim/opensim.git
synced 2026-07-15 03:55:47 +08:00
Mantis 6028 osAvatarStopAnimation not stopping animations via UUID
Corrected to stop animations using the animation UUID similar to llStopAnimation. See http://opensimulator.org/wiki/OsAvatarStopAnimation
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
67ebe80dd9
commit
120f8145fc
@@ -957,16 +957,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
ScenePresence target = (ScenePresence)World.Entities[avatarID];
|
||||
if (target != null)
|
||||
{
|
||||
UUID animID = UUID.Zero;
|
||||
lock (m_host.TaskInventory)
|
||||
UUID animID = new UUID();
|
||||
if (!UUID.TryParse(animation, out animID))
|
||||
{
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
animID = UUID.Zero;
|
||||
lock (m_host.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Name == animation)
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Type == (int)AssetType.Animation)
|
||||
animID = inv.Value.AssetID;
|
||||
continue;
|
||||
if (inv.Value.Name == animation)
|
||||
{
|
||||
if (inv.Value.Type == (int)AssetType.Animation)
|
||||
animID = inv.Value.AssetID;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user