From 9949ac2f9f448faaa873b98451c6025d687358a2 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 22 Mar 2012 00:10:41 +0000 Subject: [PATCH] refactor: Rename AvatarAnimations -> DefaultAvatarAnimations for code clarity since non-default animations are handled completely separately from this class --- OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 4 ++-- .../{AvatarAnimations.cs => DefaultAvatarAnimations.cs} | 4 ++-- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 4 ++-- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) rename OpenSim/Region/Framework/Scenes/Animation/{AvatarAnimations.cs => DefaultAvatarAnimations.cs} (98%) diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index 240a424415..33041e9ac7 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs @@ -138,9 +138,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation // "[ANIMATION SET]: Setting default animation {0}, sequence number {1}, object id {2}", // anim, sequenceNum, objectID); - if (AvatarAnimations.AnimsUUID.ContainsKey(anim)) + if (DefaultAvatarAnimations.AnimsUUID.ContainsKey(anim)) { - return SetDefaultAnimation(AvatarAnimations.AnimsUUID[anim], sequenceNum, objectID); + return SetDefaultAnimation(DefaultAvatarAnimations.AnimsUUID[anim], sequenceNum, objectID); } return false; } diff --git a/OpenSim/Region/Framework/Scenes/Animation/AvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs similarity index 98% rename from OpenSim/Region/Framework/Scenes/Animation/AvatarAnimations.cs rename to OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs index ec928f4e97..c2b0468067 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AvatarAnimations.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs @@ -33,7 +33,7 @@ using OpenMetaverse; namespace OpenSim.Region.Framework.Scenes.Animation { - public class AvatarAnimations + public class DefaultAvatarAnimations { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -43,7 +43,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation public static Dictionary AnimsNames = new Dictionary(); public static Dictionary AnimStateNames = new Dictionary(); - static AvatarAnimations() + static DefaultAvatarAnimations() { LoadAnimations(DefaultAnimationsPath); } diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 9038ebc590..cded9be47d 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation // 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 = AvatarAnimations.GetDefaultAnimation(name.ToUpper()); + UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name.ToUpper()); if (animID == UUID.Zero) return; @@ -125,7 +125,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation // 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 = AvatarAnimations.GetDefaultAnimation(name); + 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 27f7c03dee..d7a629bf8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4314,7 +4314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_host.RegionHandle == presence.RegionHandle) { - Dictionary animationstateNames = AvatarAnimations.AnimStateNames; + Dictionary animationstateNames = DefaultAvatarAnimations.AnimStateNames; if (presence != null) { @@ -5600,7 +5600,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } if (agent.Animator.Animations.DefaultAnimation.AnimID - == AvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) + == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) { flags |= ScriptBaseClass.AGENT_SITTING; } @@ -7714,7 +7714,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Vector lower; LSL_Vector upper; if (presence.Animator.Animations.DefaultAnimation.AnimID - == AvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) + == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) { // This is for ground sitting avatars float height = presence.Appearance.AvatarHeight / 2.66666667f;