From 06bdfc48d00172ae9ac26e1260a9574f9e798fbe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 2 Jun 2020 18:25:13 +0100 Subject: [PATCH] move the ToUpper to where it belongs --- .../Framework/Scenes/Animation/DefaultAvatarAnimations.cs | 2 +- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 8 ++------ .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs index 411c96d68e..eaf644e7d8 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation // m_log.DebugFormat( // "[AVATAR ANIMATIONS]: Looking for default avatar animation with name {0}", name); UUID id; - if (AnimsUUIDbyName.TryGetValue(name, out id)) + if (AnimsUUIDbyName.TryGetValue(name.ToUpper(), out id)) { // m_log.DebugFormat( // "[AVATAR ANIMATIONS]: Found {0} {1} in GetDefaultAvatarAnimation()", AnimsUUID[name], name); diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 233d06f0d8..9abb2eccb7 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -107,9 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation if (m_scenePresence.IsChildAgent) return; - // XXX: For some reason, we store all animations and use them with upper case names, but in LSL animations - // are referenced with lower case names! - UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name.ToUpper()); + UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name); if (animID == UUID.Zero) return; @@ -165,9 +163,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation if (m_scenePresence.IsChildAgent) return; - // XXX: For some reason, we store all animations and use them with upper case names, but in LSL animations - // are referenced with lower case names! - UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name.ToUpper()); + UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name); if (animID == UUID.Zero) return; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 71471b8744..ba842f68ec 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4195,7 +4195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Do NOT try to parse UUID, animations cannot be triggered by ID UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); if (animID == UUID.Zero) - animID = DefaultAvatarAnimations.GetDefaultAnimation(anim.ToUpper()); + animID = DefaultAvatarAnimations.GetDefaultAnimation(anim); if (animID != UUID.Zero) m_host.AddAnimation(animID, anim); } @@ -4205,7 +4205,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); if (animID == UUID.Zero) - animID = DefaultAvatarAnimations.GetDefaultAnimation(anim.ToUpper()); + animID = DefaultAvatarAnimations.GetDefaultAnimation(anim); if (animID != UUID.Zero) m_host.RemoveAnimation(animID); }