mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Merge branch 'careminster' into tests
This commit is contained in:
@@ -40,10 +40,11 @@ using OpenSim;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Region.CoreModules;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.CoreModules.World.Land;
|
||||
using OpenSim.Region.CoreModules.World.Terrain;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Framework.Scenes.Animation;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
|
||||
@@ -3097,11 +3098,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (presence != null)
|
||||
{
|
||||
// Do NOT try to parse UUID, animations cannot be triggered by ID
|
||||
UUID animID=InventoryKey(anim, (int)AssetType.Animation);
|
||||
UUID animID = InventoryKey(anim, (int)AssetType.Animation);
|
||||
if (animID == UUID.Zero)
|
||||
presence.AddAnimation(anim, m_host.UUID);
|
||||
presence.Animator.AddAnimation(anim, m_host.UUID);
|
||||
else
|
||||
presence.AddAnimation(animID, m_host.UUID);
|
||||
presence.Animator.AddAnimation(animID, m_host.UUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3141,9 +3142,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (presence != null)
|
||||
{
|
||||
if (animID == UUID.Zero)
|
||||
presence.RemoveAnimation(anim);
|
||||
presence.Animator.RemoveAnimation(anim);
|
||||
else
|
||||
presence.RemoveAnimation(animID);
|
||||
presence.Animator.RemoveAnimation(animID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3987,12 +3988,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if (presence != null)
|
||||
{
|
||||
AnimationSet currentAnims = presence.Animations;
|
||||
AnimationSet currentAnims = presence.Animator.Animations;
|
||||
string currentAnimationState = String.Empty;
|
||||
if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState))
|
||||
return currentAnimationState;
|
||||
}
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
@@ -5326,7 +5328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
flags |= ScriptBaseClass.AGENT_TYPING;
|
||||
}
|
||||
|
||||
string agentMovementAnimation = agent.GetMovementAnimation();
|
||||
string agentMovementAnimation = agent.Animator.GetMovementAnimation();
|
||||
|
||||
if (agentMovementAnimation == "CROUCH")
|
||||
{
|
||||
@@ -5358,7 +5360,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
flags |= ScriptBaseClass.AGENT_SITTING;
|
||||
}
|
||||
|
||||
if (agent.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||
if (agent.Animator.Animations.DefaultAnimation.AnimID
|
||||
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||
{
|
||||
flags |= ScriptBaseClass.AGENT_SITTING;
|
||||
}
|
||||
@@ -7148,7 +7151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (av == null || av.IsChildAgent) // only if in the region
|
||||
return l;
|
||||
UUID[] anims;
|
||||
anims = av.GetAnimationArray();
|
||||
anims = av.Animator.GetAnimationArray();
|
||||
foreach (UUID foo in anims)
|
||||
l.Add(foo.ToString());
|
||||
return l;
|
||||
@@ -7276,7 +7279,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
LSL_Vector lower;
|
||||
LSL_Vector upper;
|
||||
if (presence.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||
if (presence.Animator.Animations.DefaultAnimation.AnimID
|
||||
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
|
||||
{
|
||||
// This is for ground sitting avatars
|
||||
float height = presence.Appearance.AvatarHeight / 2.66666667f;
|
||||
|
||||
@@ -741,9 +741,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
if (animID == UUID.Zero)
|
||||
target.AddAnimation(animation, m_host.UUID);
|
||||
target.Animator.AddAnimation(animation, m_host.UUID);
|
||||
else
|
||||
target.AddAnimation(animID, m_host.UUID);
|
||||
target.Animator.AddAnimation(animID, m_host.UUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -773,10 +773,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (animID == UUID.Zero)
|
||||
target.RemoveAnimation(animation);
|
||||
target.Animator.RemoveAnimation(animation);
|
||||
else
|
||||
target.RemoveAnimation(animID);
|
||||
target.Animator.RemoveAnimation(animID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user