Also check standard anim names

avinationmerge
Melanie Thielker 2014-09-09 03:31:04 +02:00
parent e775e1a317
commit 5376d0a97b
1 changed files with 16 additions and 4 deletions

View File

@ -13510,12 +13510,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (presence == null)
return;
UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
UUID animID;
if (animState == anim)
{
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);
}