look for animation on part inventory before default animations, so

user can use same name. Search directly on default animations using
 uppercase.
avinationmerge
UbitUmarov 2014-09-09 23:22:36 +01:00
parent e37fd5e716
commit 4842806ea8
1 changed files with 7 additions and 4 deletions

View File

@ -13529,13 +13529,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
animID = UUID.Zero; animID = UUID.Zero;
} }
else if (MovementAnimationsForLSL.ContainsKey(anim))
{
animID = DefaultAvatarAnimations.AnimsUUID[MovementAnimationsForLSL[anim]];
}
else else
{ {
animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); 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) if (animID == UUID.Zero)
{ {
llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found"); llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found");