refactor: Rename AvatarAnimations -> DefaultAvatarAnimations for code clarity since non-default animations are handled completely separately from this class
parent
71ec84d77f
commit
9949ac2f9f
|
@ -138,9 +138,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
// "[ANIMATION SET]: Setting default animation {0}, sequence number {1}, object id {2}",
|
// "[ANIMATION SET]: Setting default animation {0}, sequence number {1}, object id {2}",
|
||||||
// anim, sequenceNum, objectID);
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes.Animation
|
namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
{
|
{
|
||||||
public class AvatarAnimations
|
public class DefaultAvatarAnimations
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// 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> AnimsNames = new Dictionary<UUID, string>();
|
||||||
public static Dictionary<UUID, string> AnimStateNames = new Dictionary<UUID, string>();
|
public static Dictionary<UUID, string> AnimStateNames = new Dictionary<UUID, string>();
|
||||||
|
|
||||||
static AvatarAnimations()
|
static DefaultAvatarAnimations()
|
||||||
{
|
{
|
||||||
LoadAnimations(DefaultAnimationsPath);
|
LoadAnimations(DefaultAnimationsPath);
|
||||||
}
|
}
|
|
@ -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
|
// 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!
|
// are referenced with lower case names!
|
||||||
UUID animID = AvatarAnimations.GetDefaultAnimation(name.ToUpper());
|
UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name.ToUpper());
|
||||||
if (animID == UUID.Zero)
|
if (animID == UUID.Zero)
|
||||||
return;
|
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
|
// 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!
|
// are referenced with lower case names!
|
||||||
UUID animID = AvatarAnimations.GetDefaultAnimation(name);
|
UUID animID = DefaultAvatarAnimations.GetDefaultAnimation(name);
|
||||||
if (animID == UUID.Zero)
|
if (animID == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -4314,7 +4314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
if (m_host.RegionHandle == presence.RegionHandle)
|
if (m_host.RegionHandle == presence.RegionHandle)
|
||||||
{
|
{
|
||||||
Dictionary<UUID, string> animationstateNames = AvatarAnimations.AnimStateNames;
|
Dictionary<UUID, string> animationstateNames = DefaultAvatarAnimations.AnimStateNames;
|
||||||
|
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
{
|
{
|
||||||
|
@ -5600,7 +5600,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
if (agent.Animator.Animations.DefaultAnimation.AnimID
|
if (agent.Animator.Animations.DefaultAnimation.AnimID
|
||||||
== AvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
== DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||||
{
|
{
|
||||||
flags |= ScriptBaseClass.AGENT_SITTING;
|
flags |= ScriptBaseClass.AGENT_SITTING;
|
||||||
}
|
}
|
||||||
|
@ -7714,7 +7714,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
LSL_Vector lower;
|
LSL_Vector lower;
|
||||||
LSL_Vector upper;
|
LSL_Vector upper;
|
||||||
if (presence.Animator.Animations.DefaultAnimation.AnimID
|
if (presence.Animator.Animations.DefaultAnimation.AnimID
|
||||||
== AvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
== DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||||
{
|
{
|
||||||
// This is for ground sitting avatars
|
// This is for ground sitting avatars
|
||||||
float height = presence.Appearance.AvatarHeight / 2.66666667f;
|
float height = presence.Appearance.AvatarHeight / 2.66666667f;
|
||||||
|
|
Loading…
Reference in New Issue