mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Apply second patch in http://opensimulator.org/mantis/view.php?id=2561
* Inserts proper animation state names into data/avataranimations.xml file so that llGetAnimation() works as one would expect. * Thanks StrawberryFride!
This commit is contained in:
@@ -3486,14 +3486,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
ScenePresence presence = World.GetScenePresence(avatar);
|
||||
if (m_host.RegionHandle == presence.RegionHandle)
|
||||
{
|
||||
Dictionary<UUID, string> animationNames = AnimationSet.Animations.AnimsNames;
|
||||
Dictionary<UUID, string> animationstateNames = AnimationSet.Animations.AnimStateNames;
|
||||
|
||||
if (presence != null)
|
||||
{
|
||||
AnimationSet currentAnims = presence.Animations;
|
||||
string currentAnimation = String.Empty;
|
||||
if (animationNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimation))
|
||||
return currentAnimation;
|
||||
string currentAnimationState = String.Empty;
|
||||
if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState))
|
||||
return currentAnimationState;
|
||||
}
|
||||
}
|
||||
return String.Empty;
|
||||
|
||||
Reference in New Issue
Block a user