diff options
author | KittoFlora | 2009-11-19 20:20:03 +0100 |
---|---|---|
committer | KittoFlora | 2009-11-19 20:20:03 +0100 |
commit | 251d1b8fbbc311ea267d0a44d5878df480d69338 (patch) | |
tree | 4ef142946d9b05d42564ddba63a99a67db5659bc /OpenSim/Region/ScriptEngine/Shared | |
parent | Clean up messages in ODE (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.zip opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.gz opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.bz2 opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.xz |
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 |
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 fc17808..5fb2775 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; | |||
40 | using OpenSim.Framework; | 40 | using OpenSim.Framework; |
41 | using OpenSim.Framework.Communications.Cache; | 41 | using OpenSim.Framework.Communications.Cache; |
42 | using OpenSim.Region.CoreModules; | 42 | using OpenSim.Region.CoreModules; |
43 | using OpenSim.Region.Framework.Interfaces; | ||
44 | using OpenSim.Region.CoreModules.World.Land; | 43 | using OpenSim.Region.CoreModules.World.Land; |
45 | using OpenSim.Region.CoreModules.World.Terrain; | 44 | using OpenSim.Region.CoreModules.World.Terrain; |
45 | using OpenSim.Region.Framework.Interfaces; | ||
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Framework.Scenes.Animation; | ||
47 | using OpenSim.Region.Physics.Manager; | 48 | using OpenSim.Region.Physics.Manager; |
48 | using OpenSim.Region.ScriptEngine.Shared; | 49 | using OpenSim.Region.ScriptEngine.Shared; |
49 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | 50 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; |
@@ -3097,11 +3098,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3097 | if (presence != null) | 3098 | if (presence != null) |
3098 | { | 3099 | { |
3099 | // Do NOT try to parse UUID, animations cannot be triggered by ID | 3100 | // Do NOT try to parse UUID, animations cannot be triggered by ID |
3100 | UUID animID=InventoryKey(anim, (int)AssetType.Animation); | 3101 | UUID animID = InventoryKey(anim, (int)AssetType.Animation); |
3101 | if (animID == UUID.Zero) | 3102 | if (animID == UUID.Zero) |
3102 | presence.AddAnimation(anim, m_host.UUID); | 3103 | presence.Animator.AddAnimation(anim, m_host.UUID); |
3103 | else | 3104 | else |
3104 | presence.AddAnimation(animID, m_host.UUID); | 3105 | presence.Animator.AddAnimation(animID, m_host.UUID); |
3105 | } | 3106 | } |
3106 | } | 3107 | } |
3107 | } | 3108 | } |
@@ -3141,9 +3142,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3141 | if (presence != null) | 3142 | if (presence != null) |
3142 | { | 3143 | { |
3143 | if (animID == UUID.Zero) | 3144 | if (animID == UUID.Zero) |
3144 | presence.RemoveAnimation(anim); | 3145 | presence.Animator.RemoveAnimation(anim); |
3145 | else | 3146 | else |
3146 | presence.RemoveAnimation(animID); | 3147 | presence.Animator.RemoveAnimation(animID); |
3147 | } | 3148 | } |
3148 | } | 3149 | } |
3149 | } | 3150 | } |
@@ -3987,12 +3988,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3987 | 3988 | ||
3988 | if (presence != null) | 3989 | if (presence != null) |
3989 | { | 3990 | { |
3990 | AnimationSet currentAnims = presence.Animations; | 3991 | AnimationSet currentAnims = presence.Animator.Animations; |
3991 | string currentAnimationState = String.Empty; | 3992 | string currentAnimationState = String.Empty; |
3992 | if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) | 3993 | if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) |
3993 | return currentAnimationState; | 3994 | return currentAnimationState; |
3994 | } | 3995 | } |
3995 | } | 3996 | } |
3997 | |||
3996 | return String.Empty; | 3998 | return String.Empty; |
3997 | } | 3999 | } |
3998 | 4000 | ||
@@ -5326,7 +5328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5326 | flags |= ScriptBaseClass.AGENT_TYPING; | 5328 | flags |= ScriptBaseClass.AGENT_TYPING; |
5327 | } | 5329 | } |
5328 | 5330 | ||
5329 | string agentMovementAnimation = agent.GetMovementAnimation(); | 5331 | string agentMovementAnimation = agent.Animator.GetMovementAnimation(); |
5330 | 5332 | ||
5331 | if (agentMovementAnimation == "CROUCH") | 5333 | if (agentMovementAnimation == "CROUCH") |
5332 | { | 5334 | { |
@@ -5358,7 +5360,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5358 | flags |= ScriptBaseClass.AGENT_SITTING; | 5360 | flags |= ScriptBaseClass.AGENT_SITTING; |
5359 | } | 5361 | } |
5360 | 5362 | ||
5361 | if (agent.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) | 5363 | if (agent.Animator.Animations.DefaultAnimation.AnimID |
5364 | == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) | ||
5362 | { | 5365 | { |
5363 | flags |= ScriptBaseClass.AGENT_SITTING; | 5366 | flags |= ScriptBaseClass.AGENT_SITTING; |
5364 | } | 5367 | } |
@@ -7148,7 +7151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7148 | if (av == null || av.IsChildAgent) // only if in the region | 7151 | if (av == null || av.IsChildAgent) // only if in the region |
7149 | return l; | 7152 | return l; |
7150 | UUID[] anims; | 7153 | UUID[] anims; |
7151 | anims = av.GetAnimationArray(); | 7154 | anims = av.Animator.GetAnimationArray(); |
7152 | foreach (UUID foo in anims) | 7155 | foreach (UUID foo in anims) |
7153 | l.Add(foo.ToString()); | 7156 | l.Add(foo.ToString()); |
7154 | return l; | 7157 | return l; |
@@ -7276,7 +7279,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7276 | { | 7279 | { |
7277 | LSL_Vector lower; | 7280 | LSL_Vector lower; |
7278 | LSL_Vector upper; | 7281 | LSL_Vector upper; |
7279 | if (presence.Animations.DefaultAnimation.AnimID == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) | 7282 | if (presence.Animator.Animations.DefaultAnimation.AnimID |
7283 | == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) | ||
7280 | { | 7284 | { |
7281 | // This is for ground sitting avatars | 7285 | // This is for ground sitting avatars |
7282 | float height = presence.Appearance.AvatarHeight / 2.66666667f; | 7286 | 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 | } |