diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index 5417c8d..d4dd0db 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | |||
@@ -35,6 +35,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | public Dictionary<string, UUID> AnimsUUID = new Dictionary<string, UUID>(); | 36 | public Dictionary<string, UUID> AnimsUUID = new Dictionary<string, UUID>(); |
37 | public Dictionary<UUID, string> AnimsNames = new Dictionary<UUID, string>(); | 37 | public Dictionary<UUID, string> AnimsNames = new Dictionary<UUID, string>(); |
38 | public Dictionary<UUID, string> AnimStateNames = new Dictionary<UUID, string>(); | ||
38 | 39 | ||
39 | public AvatarAnimations() | 40 | public AvatarAnimations() |
40 | { | 41 | { |
@@ -46,11 +47,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
46 | { | 47 | { |
47 | if (nod.Attributes["name"] != null) | 48 | if (nod.Attributes["name"] != null) |
48 | { | 49 | { |
49 | string name = (string)nod.Attributes["name"].Value; | 50 | string name = (string)nod.Attributes["name"].Value; |
50 | UUID id = (UUID)nod.InnerText; | 51 | UUID id = (UUID)nod.InnerText; |
52 | string animState = (string)nod.Attributes["state"].Value; | ||
51 | 53 | ||
52 | AnimsUUID.Add(name, id); | 54 | AnimsUUID.Add(name, id); |
53 | AnimsNames.Add(id, name); | 55 | AnimsNames.Add(id, name); |
56 | if (animState != "") | ||
57 | AnimStateNames.Add(id, animState); | ||
54 | } | 58 | } |
55 | } | 59 | } |
56 | } | 60 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 778cf9f..eefb8e6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3486,14 +3486,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3486 | ScenePresence presence = World.GetScenePresence(avatar); | 3486 | ScenePresence presence = World.GetScenePresence(avatar); |
3487 | if (m_host.RegionHandle == presence.RegionHandle) | 3487 | if (m_host.RegionHandle == presence.RegionHandle) |
3488 | { | 3488 | { |
3489 | Dictionary<UUID, string> animationNames = AnimationSet.Animations.AnimsNames; | 3489 | Dictionary<UUID, string> animationstateNames = AnimationSet.Animations.AnimStateNames; |
3490 | 3490 | ||
3491 | if (presence != null) | 3491 | if (presence != null) |
3492 | { | 3492 | { |
3493 | AnimationSet currentAnims = presence.Animations; | 3493 | AnimationSet currentAnims = presence.Animations; |
3494 | string currentAnimation = String.Empty; | 3494 | string currentAnimationState = String.Empty; |
3495 | if (animationNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimation)) | 3495 | if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) |
3496 | return currentAnimation; | 3496 | return currentAnimationState; |
3497 | } | 3497 | } |
3498 | } | 3498 | } |
3499 | return String.Empty; | 3499 | return String.Empty; |