aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs23
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
2 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0ea62d7..ff5dd98 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3093,11 +3093,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3093 if (presence != null) 3093 if (presence != null)
3094 { 3094 {
3095 // Do NOT try to parse UUID, animations cannot be triggered by ID 3095 // Do NOT try to parse UUID, animations cannot be triggered by ID
3096 UUID animID=InventoryKey(anim, (int)AssetType.Animation); 3096 UUID animID = InventoryKey(anim, (int)AssetType.Animation);
3097 if (animID == UUID.Zero) 3097 if (animID == UUID.Zero)
3098 presence.AddAnimation(anim, m_host.UUID); 3098 presence.Animator.AddAnimation(anim, m_host.UUID);
3099 else 3099 else
3100 presence.AddAnimation(animID, m_host.UUID); 3100 presence.Animator.AddAnimation(animID, m_host.UUID);
3101 } 3101 }
3102 } 3102 }
3103 } 3103 }
@@ -3137,9 +3137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3137 if (presence != null) 3137 if (presence != null)
3138 { 3138 {
3139 if (animID == UUID.Zero) 3139 if (animID == UUID.Zero)
3140 presence.RemoveAnimation(anim); 3140 presence.Animator.RemoveAnimation(anim);
3141 else 3141 else
3142 presence.RemoveAnimation(animID); 3142 presence.Animator.RemoveAnimation(animID);
3143 } 3143 }
3144 } 3144 }
3145 } 3145 }
@@ -3983,12 +3983,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3983 3983
3984 if (presence != null) 3984 if (presence != null)
3985 { 3985 {
3986 AnimationSet currentAnims = presence.Animations; 3986 AnimationSet currentAnims = presence.Animator.Animations;
3987 string currentAnimationState = String.Empty; 3987 string currentAnimationState = String.Empty;
3988 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) 3988 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState))
3989 return currentAnimationState; 3989 return currentAnimationState;
3990 } 3990 }
3991 } 3991 }
3992
3992 return String.Empty; 3993 return String.Empty;
3993 } 3994 }
3994 3995
@@ -5322,7 +5323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5322 flags |= ScriptBaseClass.AGENT_TYPING; 5323 flags |= ScriptBaseClass.AGENT_TYPING;
5323 } 5324 }
5324 5325
5325 string agentMovementAnimation = agent.GetMovementAnimation(); 5326 string agentMovementAnimation = agent.Animator.GetMovementAnimation();
5326 5327
5327 if (agentMovementAnimation == "CROUCH") 5328 if (agentMovementAnimation == "CROUCH")
5328 { 5329 {
@@ -5354,7 +5355,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5354 flags |= ScriptBaseClass.AGENT_SITTING; 5355 flags |= ScriptBaseClass.AGENT_SITTING;
5355 } 5356 }
5356 5357
5357 if (agent.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 5358 if (agent.Animator.Animations.DefaultAnimation.AnimID
5359 == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
5358 { 5360 {
5359 flags |= ScriptBaseClass.AGENT_SITTING; 5361 flags |= ScriptBaseClass.AGENT_SITTING;
5360 } 5362 }
@@ -7144,7 +7146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7144 if (av == null || av.IsChildAgent) // only if in the region 7146 if (av == null || av.IsChildAgent) // only if in the region
7145 return l; 7147 return l;
7146 UUID[] anims; 7148 UUID[] anims;
7147 anims = av.GetAnimationArray(); 7149 anims = av.Animator.GetAnimationArray();
7148 foreach (UUID foo in anims) 7150 foreach (UUID foo in anims)
7149 l.Add(foo.ToString()); 7151 l.Add(foo.ToString());
7150 return l; 7152 return l;
@@ -7272,7 +7274,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7272 { 7274 {
7273 LSL_Vector lower; 7275 LSL_Vector lower;
7274 LSL_Vector upper; 7276 LSL_Vector upper;
7275 if (presence.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 7277 if (presence.Animator.Animations.DefaultAnimation.AnimID
7278 == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
7276 { 7279 {
7277 // This is for ground sitting avatars 7280 // This is for ground sitting avatars
7278 float height = presence.Appearance.AvatarHeight / 2.66666667f; 7281 float height = presence.Appearance.AvatarHeight / 2.66666667f;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 3ffcff0..7fdbac8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -741,9 +741,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
741 } 741 }
742 } 742 }
743 if (animID == UUID.Zero) 743 if (animID == UUID.Zero)
744 target.AddAnimation(animation, m_host.UUID); 744 target.Animator.AddAnimation(animation, m_host.UUID);
745 else 745 else
746 target.AddAnimation(animID, m_host.UUID); 746 target.Animator.AddAnimation(animID, m_host.UUID);
747 } 747 }
748 } 748 }
749 } 749 }
@@ -773,10 +773,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
773 } 773 }
774 } 774 }
775 } 775 }
776
776 if (animID == UUID.Zero) 777 if (animID == UUID.Zero)
777 target.RemoveAnimation(animation); 778 target.Animator.RemoveAnimation(animation);
778 else 779 else
779 target.RemoveAnimation(animID); 780 target.Animator.RemoveAnimation(animID);
780 } 781 }
781 } 782 }
782 } 783 }