Instead of loading default avatar animations in both SLUtil and AvatarAnimations, load just in AvatarAnimations instead.

This lets us remove the dependency of OpenSim.Framework.dll on data/avataranimations.xml, which is not necessary for ROBUST.
This commit also takes care of the odd situation where animations are stored and used internally with uppercase names (e.g. "STAND")
but scripts refer to them with lowercase names (e.g. "sit").
This commit is contained in:
Justin Clark-Casey (justincc)
2012-03-21 23:57:39 +00:00
parent 54a8a5baba
commit 1a8769e6ef
10 changed files with 84 additions and 98 deletions

View File

@@ -4314,7 +4314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (m_host.RegionHandle == presence.RegionHandle)
{
Dictionary<UUID, string> animationstateNames = AnimationSet.Animations.AnimStateNames;
Dictionary<UUID, string> animationstateNames = AvatarAnimations.AnimStateNames;
if (presence != null)
{
@@ -5600,7 +5600,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
if (agent.Animator.Animations.DefaultAnimation.AnimID
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
== AvatarAnimations.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
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
== AvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
{
// This is for ground sitting avatars
float height = presence.Appearance.AvatarHeight / 2.66666667f;