diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f4809a79ab..29e526d243 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -13510,11 +13510,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence == null) return; - UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); - if (animID == UUID.Zero) + UUID animID; + if (animState == anim) { - llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found"); - return; + 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) + { + llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found"); + return; + } } presence.SetAnimationOverride(state, animID);