Actually do the overriding

avinationmerge
Melanie Thielker 2014-09-09 04:12:10 +02:00
parent 5376d0a97b
commit 18023169e7
2 changed files with 14 additions and 1 deletions

View File

@ -196,7 +196,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
// "[SCENE PRESENCE ANIMATOR]: Setting movement animation {0} for {1}",
// anim, m_scenePresence.Name);
if (m_animations.TrySetDefaultAnimation(
UUID overridenAnim = m_scenePresence.Overrides.GetOverriddenAnimation(anim);
if (overridenAnim != UUID.Zero)
{
m_animations.SetDefaultAnimation(overridenAnim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID);
ret = true;
}
else if (m_animations.TrySetDefaultAnimation(
anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID))
{
// m_log.DebugFormat(

View File

@ -239,6 +239,11 @@ namespace OpenSim.Region.Framework.Scenes
/// </value>
public ScenePresenceAnimator Animator { get; private set; }
/// <value>
/// Server Side Animation Override
/// </value>
public MovementAnimationOverrides Overrides { get; private set; }
/// <summary>
/// Attachments recorded on this avatar.
/// </summary>
@ -967,6 +972,7 @@ namespace OpenSim.Region.Framework.Scenes
IsLoggingIn = false;
m_sendCoarseLocationsMethod = SendCoarseLocationsDefault;
Animator = new ScenePresenceAnimator(this);
Overrides = new MovementAnimationOverrides();
PresenceType = type;
DrawDistance = world.DefaultDrawDistance;
RegionHandle = world.RegionInfo.RegionHandle;
@ -6007,6 +6013,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SetAnimationOverride(string animState, UUID animID)
{
Overrides.SetOverride(animState, animID);
}
}
}