diff options
Diffstat (limited to '')
4 files changed, 52 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bb083fa..1fb4c1b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3897,7 +3897,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3897 | ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | | 3897 | ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | |
3898 | ScriptBaseClass.PERMISSION_CONTROL_CAMERA | | 3898 | ScriptBaseClass.PERMISSION_CONTROL_CAMERA | |
3899 | ScriptBaseClass.PERMISSION_TRACK_CAMERA | | 3899 | ScriptBaseClass.PERMISSION_TRACK_CAMERA | |
3900 | ScriptBaseClass.PERMISSION_ATTACH; | 3900 | ScriptBaseClass.PERMISSION_ATTACH | |
3901 | ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS; | ||
3901 | 3902 | ||
3902 | } | 3903 | } |
3903 | else | 3904 | else |
@@ -13486,6 +13487,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13486 | m_UrlModule.HttpContentType(new UUID(id),type); | 13487 | m_UrlModule.HttpContentType(new UUID(id),type); |
13487 | } | 13488 | } |
13488 | } | 13489 | } |
13490 | |||
13491 | public void llSetAnimationOverride(LSL_String animState, LSL_String anim) | ||
13492 | { | ||
13493 | string state = String.Empty; | ||
13494 | |||
13495 | foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL) | ||
13496 | { | ||
13497 | if (kvp.Value == animState) | ||
13498 | { | ||
13499 | state = kvp.Key; | ||
13500 | break; | ||
13501 | } | ||
13502 | } | ||
13503 | |||
13504 | if (state == String.Empty) | ||
13505 | { | ||
13506 | llShout(ScriptBaseClass.DEBUG_CHANNEL, "Invalid animation state " + animState); | ||
13507 | return; | ||
13508 | } | ||
13509 | |||
13510 | if (m_item.PermsGranter == UUID.Zero) | ||
13511 | return; | ||
13512 | |||
13513 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0) | ||
13514 | { | ||
13515 | llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations"); | ||
13516 | return; | ||
13517 | } | ||
13518 | |||
13519 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); | ||
13520 | |||
13521 | if (presence == null) | ||
13522 | return; | ||
13523 | |||
13524 | UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); | ||
13525 | if (animID == UUID.Zero) | ||
13526 | { | ||
13527 | llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found"); | ||
13528 | return; | ||
13529 | } | ||
13530 | |||
13531 | presence.SetAnimationOverride(state, animID); | ||
13532 | } | ||
13489 | } | 13533 | } |
13490 | 13534 | ||
13491 | public class NotecardCache | 13535 | 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 | } |