diff options
author | Talun | 2012-05-23 00:33:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-25 23:45:03 +0100 |
commit | 120f8145fcfe2cdc4e39a92e5838a2a41eb51406 (patch) | |
tree | 81035ccd214e36e382262fee946041f1456c5c4b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Resolve some mono compiler warnings. (diff) | |
download | opensim-SC_OLD-120f8145fcfe2cdc4e39a92e5838a2a41eb51406.zip opensim-SC_OLD-120f8145fcfe2cdc4e39a92e5838a2a41eb51406.tar.gz opensim-SC_OLD-120f8145fcfe2cdc4e39a92e5838a2a41eb51406.tar.bz2 opensim-SC_OLD-120f8145fcfe2cdc4e39a92e5838a2a41eb51406.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ad1a358..5dbd9ec 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -957,16 +957,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
957 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; | 957 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; |
958 | if (target != null) | 958 | if (target != null) |
959 | { | 959 | { |
960 | UUID animID = UUID.Zero; | 960 | UUID animID = new UUID(); |
961 | lock (m_host.TaskInventory) | 961 | if (!UUID.TryParse(animation, out animID)) |
962 | { | 962 | { |
963 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | 963 | animID = UUID.Zero; |
964 | lock (m_host.TaskInventory) | ||
964 | { | 965 | { |
965 | if (inv.Value.Name == animation) | 966 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
966 | { | 967 | { |
967 | if (inv.Value.Type == (int)AssetType.Animation) | 968 | if (inv.Value.Name == animation) |
968 | animID = inv.Value.AssetID; | 969 | { |
969 | continue; | 970 | if (inv.Value.Type == (int)AssetType.Animation) |
971 | animID = inv.Value.AssetID; | ||
972 | continue; | ||
973 | } | ||
970 | } | 974 | } |
971 | } | 975 | } |
972 | } | 976 | } |