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.cs43
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
4 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b569194..085dfc8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -13475,6 +13475,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13475 m_UrlModule.HttpContentType(new UUID(id),type); 13475 m_UrlModule.HttpContentType(new UUID(id),type);
13476 } 13476 }
13477 } 13477 }
13478
13479 public void llSetAnimationOverride(LSL_String animState, LSL_String anim)
13480 {
13481 string state = String.Empty;
13482
13483 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
13484 {
13485 if (kvp.Value == animState)
13486 {
13487 state = kvp.Key;
13488 break;
13489 }
13490 }
13491
13492 if (state == String.Empty)
13493 {
13494 llShout(ScriptBaseClass.DEBUG_CHANNEL, "Invalid animation state " + animState);
13495 return;
13496 }
13497
13498 if (m_item.PermsGranter == UUID.Zero)
13499 return;
13500
13501 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
13502 {
13503 llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
13504 return;
13505 }
13506
13507 ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
13508
13509 if (presence == null)
13510 return;
13511
13512 UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
13513 if (animID == UUID.Zero)
13514 {
13515 llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found");
13516 return;
13517 }
13518
13519 presence.SetAnimationOverride(state, animID);
13520 }
13478 } 13521 }
13479 13522
13480 public class NotecardCache 13523 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 d211a2b..14e659f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -434,5 +434,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
434 void llSetKeyframedMotion(LSL_List frames, LSL_List options); 434 void llSetKeyframedMotion(LSL_List frames, LSL_List options);
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 } 438 }
438} 439}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index e59c0be..e6ab6ec 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -81,6 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
81 public const int PERMISSION_TRACK_CAMERA = 1024; 81 public const int PERMISSION_TRACK_CAMERA = 1024;
82 public const int PERMISSION_CONTROL_CAMERA = 2048; 82 public const int PERMISSION_CONTROL_CAMERA = 2048;
83 public const int PERMISSION_TELEPORT = 4096; 83 public const int PERMISSION_TELEPORT = 4096;
84 public const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000;
84 85
85 public const int AGENT_FLYING = 1; 86 public const int AGENT_FLYING = 1;
86 public const int AGENT_ATTACHMENTS = 2; 87 public const int AGENT_ATTACHMENTS = 2;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 4fc8d65..753bbb7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -2014,5 +2014,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
2014 { 2014 {
2015 return m_LSL_Functions.llGetPhysicsMaterial(); 2015 return m_LSL_Functions.llGetPhysicsMaterial();
2016 } 2016 }
2017
2018 public void llSetAnimationOverride(LSL_String animState, LSL_String anim)
2019 {
2020 m_LSL_Functions.llSetAnimationOverride(animState, anim);
2021 }
2017 } 2022 }
2018} 2023}