aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
authorMelanie Thielker2014-09-09 03:01:05 +0200
committerMelanie Thielker2014-09-09 03:01:05 +0200
commitf2390f7c72c70912da8c5d4626064996d42811bc (patch)
treed6382ec5b3c91075e71bbb12bd89a14c0021dbfc /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
parent do not send objectproprieties on sop.SetGroup(). I many cases this will (diff)
downloadopensim-SC_OLD-f2390f7c72c70912da8c5d4626064996d42811bc.zip
opensim-SC_OLD-f2390f7c72c70912da8c5d4626064996d42811bc.tar.gz
opensim-SC_OLD-f2390f7c72c70912da8c5d4626064996d42811bc.tar.bz2
opensim-SC_OLD-f2390f7c72c70912da8c5d4626064996d42811bc.tar.xz
Plumb llSetAnimationOverride
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs43
1 files changed, 43 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