refactor: Rename AvatarAnimations -> DefaultAvatarAnimations for code clarity since non-default animations are handled completely separately from this class

0.7.4.1
Justin Clark-Casey (justincc) 2012-03-22 00:10:41 +00:00
parent 71ec84d77f
commit 9949ac2f9f
4 changed files with 9 additions and 9 deletions

View File

@ -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;
}

View File

@ -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<UUID, string> AnimsNames = new Dictionary<UUID, string>();
public static Dictionary<UUID, string> AnimStateNames = new Dictionary<UUID, string>();
static AvatarAnimations()
static DefaultAvatarAnimations()
{
LoadAnimations(DefaultAnimationsPath);
}

View File

@ -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;

View File

@ -4314,7 +4314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (m_host.RegionHandle == presence.RegionHandle)
{
Dictionary<UUID, string> animationstateNames = AvatarAnimations.AnimStateNames;
Dictionary<UUID, string> 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;