From 4842806ea8c60a967904f4dfee08426f6c53df3f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Sep 2014 23:22:36 +0100 Subject: look for animation on part inventory before default animations, so user can use same name. Search directly on default animations using uppercase. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9dcdf5b..caf9fca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -13529,13 +13529,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { animID = UUID.Zero; } - else if (MovementAnimationsForLSL.ContainsKey(anim)) - { - animID = DefaultAvatarAnimations.AnimsUUID[MovementAnimationsForLSL[anim]]; - } else { animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); + + if (animID == UUID.Zero) + { + String animupper = ((string)anim).ToUpperInvariant(); + DefaultAvatarAnimations.AnimsUUID.TryGetValue(animupper, out animID); + } + if (animID == UUID.Zero) { llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found"); -- cgit v1.1