diff options
author | Melanie Thielker | 2014-09-09 03:01:05 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-09-09 03:01:05 +0200 |
commit | f2390f7c72c70912da8c5d4626064996d42811bc (patch) | |
tree | d6382ec5b3c91075e71bbb12bd89a14c0021dbfc /OpenSim | |
parent | do not send objectproprieties on sop.SetGroup(). I many cases this will (diff) | |
download | opensim-SC-f2390f7c72c70912da8c5d4626064996d42811bc.zip opensim-SC-f2390f7c72c70912da8c5d4626064996d42811bc.tar.gz opensim-SC-f2390f7c72c70912da8c5d4626064996d42811bc.tar.bz2 opensim-SC-f2390f7c72c70912da8c5d4626064996d42811bc.tar.xz |
Plumb llSetAnimationOverride
Diffstat (limited to 'OpenSim')
5 files changed, 54 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 47acb0b..4d5f747 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -6004,5 +6004,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
6004 | Animator.SendAnimPackToClient(p.ControllingClient); | 6004 | Animator.SendAnimPackToClient(p.ControllingClient); |
6005 | SendAttachmentsToAgentNF(p); | 6005 | SendAttachmentsToAgentNF(p); |
6006 | } | 6006 | } |
6007 | |||
6008 | public void SetAnimationOverride(string animState, UUID animID) | ||
6009 | { | ||
6010 | } | ||
6007 | } | 6011 | } |
6008 | } | 6012 | } |
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 | } |