aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2014-09-09 20:50:41 +0200
committerMelanie Thielker2014-09-09 20:50:41 +0200
commit87a4abac5085f7554699375eaf3d4b6cc621318a (patch)
tree32a20d19dad92a99c7ecd40d9d0d9ec5989e6c50
parentMerge branch 'ubitworkmaster' (diff)
downloadopensim-SC-87a4abac5085f7554699375eaf3d4b6cc621318a.zip
opensim-SC-87a4abac5085f7554699375eaf3d4b6cc621318a.tar.gz
opensim-SC-87a4abac5085f7554699375eaf3d4b6cc621318a.tar.bz2
opensim-SC-87a4abac5085f7554699375eaf3d4b6cc621318a.tar.xz
Plumb the rest of the serverside AO
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs96
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs10
4 files changed, 113 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cecb9cf..b6eb4e4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -6037,5 +6037,10 @@ namespace OpenSim.Region.Framework.Scenes
6037 Overrides.SetOverride(animState, animID); 6037 Overrides.SetOverride(animState, animID);
6038 Animator.SendAnimPack(); 6038 Animator.SendAnimPack();
6039 } 6039 }
6040
6041 public UUID GetAnimationOverride(string animState)
6042 {
6043 return Overrides.GetOverriddenAnimation(animState);
6044 }
6040 } 6045 }
6041} 6046}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 04ed0d1..9dcdf5b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -13545,6 +13545,102 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13545 13545
13546 presence.SetAnimationOverride(state, animID); 13546 presence.SetAnimationOverride(state, animID);
13547 } 13547 }
13548
13549 public void llResetAnimationOverride(LSL_String animState)
13550 {
13551 ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
13552 if (presence == null)
13553 return;
13554
13555 if (m_item.PermsGranter == UUID.Zero)
13556 {
13557 llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
13558 return;
13559 }
13560
13561 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
13562 {
13563 llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
13564 return;
13565 }
13566
13567 if (animState == "ALL")
13568 {
13569 presence.SetAnimationOverride("ALL", UUID.Zero);
13570 return;
13571 }
13572
13573 string state = String.Empty;
13574
13575 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
13576 {
13577 if (kvp.Value.ToLower() == ((string)animState).ToLower())
13578 {
13579 state = kvp.Key;
13580 break;
13581 }
13582 }
13583
13584 if (state == String.Empty)
13585 {
13586 return;
13587 }
13588
13589 presence.SetAnimationOverride(state, UUID.Zero);
13590 }
13591
13592 public LSL_String llGetAnimationOverride(LSL_String animState)
13593 {
13594 ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
13595 if (presence == null)
13596 return String.Empty;
13597
13598 if (m_item.PermsGranter == UUID.Zero)
13599 {
13600 llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
13601 return String.Empty;
13602 }
13603
13604 if ((m_item.PermsMask & (ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS | ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION)) == 0)
13605 {
13606 llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
13607 return String.Empty;
13608 }
13609
13610 string state = String.Empty;
13611
13612 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
13613 {
13614 if (kvp.Value.ToLower() == ((string)animState).ToLower())
13615 {
13616 state = kvp.Key;
13617 break;
13618 }
13619 }
13620
13621 if (state == String.Empty)
13622 {
13623 return String.Empty;
13624 }
13625
13626 UUID animID = presence.GetAnimationOverride(state);
13627 if (animID == UUID.Zero)
13628 return animState;
13629
13630 foreach (KeyValuePair<string, UUID> kvp in DefaultAvatarAnimations.AnimsUUID)
13631 {
13632 if (kvp.Value == animID)
13633 return MovementAnimationsForLSL[kvp.Key];
13634 }
13635
13636 foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems())
13637 {
13638 if (item.AssetID == animID)
13639 return item.Name;
13640 }
13641
13642 return String.Empty;
13643 }
13548 } 13644 }
13549 13645
13550 public class NotecardCache 13646 public class NotecardCache
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 14e659f..8c51564 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -435,5 +435,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
435 LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); 435 LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
436 LSL_List llGetPhysicsMaterial(); 436 LSL_List llGetPhysicsMaterial();
437 void llSetAnimationOverride(LSL_String animState, LSL_String anim); 437 void llSetAnimationOverride(LSL_String animState, LSL_String anim);
438 void llResetAnimationOverride(LSL_String anim_state);
439 LSL_String llGetAnimationOverride(LSL_String anim_state);
438 } 440 }
439} 441}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 753bbb7..78c41a7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -2019,5 +2019,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
2019 { 2019 {
2020 m_LSL_Functions.llSetAnimationOverride(animState, anim); 2020 m_LSL_Functions.llSetAnimationOverride(animState, anim);
2021 } 2021 }
2022
2023 public void llResetAnimationOverride(LSL_String anim_state)
2024 {
2025 m_LSL_Functions.llResetAnimationOverride(anim_state);
2026 }
2027
2028 public LSL_String llGetAnimationOverride(LSL_String anim_state)
2029 {
2030 return m_LSL_Functions.llGetAnimationOverride(anim_state);
2031 }
2022 } 2032 }
2023} 2033}