aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
2 files changed, 20 insertions, 15 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..8eebf02 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -40,10 +40,11 @@ using OpenSim;
40using OpenSim.Framework; 40using OpenSim.Framework;
41using OpenSim.Framework.Communications.Cache; 41using OpenSim.Framework.Communications.Cache;
42using OpenSim.Region.CoreModules; 42using OpenSim.Region.CoreModules;
43using OpenSim.Region.Framework.Interfaces;
44using OpenSim.Region.CoreModules.World.Land; 43using OpenSim.Region.CoreModules.World.Land;
45using OpenSim.Region.CoreModules.World.Terrain; 44using OpenSim.Region.CoreModules.World.Terrain;
45using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes; 46using OpenSim.Region.Framework.Scenes;
47using OpenSim.Region.Framework.Scenes.Animation;
47using OpenSim.Region.Physics.Manager; 48using OpenSim.Region.Physics.Manager;
48using OpenSim.Region.ScriptEngine.Shared; 49using OpenSim.Region.ScriptEngine.Shared;
49using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; 50using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
@@ -3093,11 +3094,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3093 if (presence != null) 3094 if (presence != null)
3094 { 3095 {
3095 // Do NOT try to parse UUID, animations cannot be triggered by ID 3096 // Do NOT try to parse UUID, animations cannot be triggered by ID
3096 UUID animID=InventoryKey(anim, (int)AssetType.Animation); 3097 UUID animID = InventoryKey(anim, (int)AssetType.Animation);
3097 if (animID == UUID.Zero) 3098 if (animID == UUID.Zero)
3098 presence.AddAnimation(anim, m_host.UUID); 3099 presence.Animator.AddAnimation(anim, m_host.UUID);
3099 else 3100 else
3100 presence.AddAnimation(animID, m_host.UUID); 3101 presence.Animator.AddAnimation(animID, m_host.UUID);
3101 } 3102 }
3102 } 3103 }
3103 } 3104 }
@@ -3137,9 +3138,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3137 if (presence != null) 3138 if (presence != null)
3138 { 3139 {
3139 if (animID == UUID.Zero) 3140 if (animID == UUID.Zero)
3140 presence.RemoveAnimation(anim); 3141 presence.Animator.RemoveAnimation(anim);
3141 else 3142 else
3142 presence.RemoveAnimation(animID); 3143 presence.Animator.RemoveAnimation(animID);
3143 } 3144 }
3144 } 3145 }
3145 } 3146 }
@@ -3983,12 +3984,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3983 3984
3984 if (presence != null) 3985 if (presence != null)
3985 { 3986 {
3986 AnimationSet currentAnims = presence.Animations; 3987 AnimationSet currentAnims = presence.Animator.Animations;
3987 string currentAnimationState = String.Empty; 3988 string currentAnimationState = String.Empty;
3988 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) 3989 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState))
3989 return currentAnimationState; 3990 return currentAnimationState;
3990 } 3991 }
3991 } 3992 }
3993
3992 return String.Empty; 3994 return String.Empty;
3993 } 3995 }
3994 3996
@@ -5322,7 +5324,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5322 flags |= ScriptBaseClass.AGENT_TYPING; 5324 flags |= ScriptBaseClass.AGENT_TYPING;
5323 } 5325 }
5324 5326
5325 string agentMovementAnimation = agent.GetMovementAnimation(); 5327 string agentMovementAnimation = agent.Animator.GetMovementAnimation();
5326 5328
5327 if (agentMovementAnimation == "CROUCH") 5329 if (agentMovementAnimation == "CROUCH")
5328 { 5330 {
@@ -5354,7 +5356,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5354 flags |= ScriptBaseClass.AGENT_SITTING; 5356 flags |= ScriptBaseClass.AGENT_SITTING;
5355 } 5357 }
5356 5358
5357 if (agent.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 5359 if (agent.Animator.Animations.DefaultAnimation.AnimID
5360 == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
5358 { 5361 {
5359 flags |= ScriptBaseClass.AGENT_SITTING; 5362 flags |= ScriptBaseClass.AGENT_SITTING;
5360 } 5363 }
@@ -7144,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7144 if (av == null || av.IsChildAgent) // only if in the region 7147 if (av == null || av.IsChildAgent) // only if in the region
7145 return l; 7148 return l;
7146 UUID[] anims; 7149 UUID[] anims;
7147 anims = av.GetAnimationArray(); 7150 anims = av.Animator.GetAnimationArray();
7148 foreach (UUID foo in anims) 7151 foreach (UUID foo in anims)
7149 l.Add(foo.ToString()); 7152 l.Add(foo.ToString());
7150 return l; 7153 return l;
@@ -7272,7 +7275,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7272 { 7275 {
7273 LSL_Vector lower; 7276 LSL_Vector lower;
7274 LSL_Vector upper; 7277 LSL_Vector upper;
7275 if (presence.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 7278 if (presence.Animator.Animations.DefaultAnimation.AnimID
7279 == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
7276 { 7280 {
7277 // This is for ground sitting avatars 7281 // This is for ground sitting avatars
7278 float height = presence.Appearance.AvatarHeight / 2.66666667f; 7282 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 }