diff options
author | Justin Clarke Casey | 2008-11-05 14:02:36 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-05 14:02:36 +0000 |
commit | b84417a220a17539cdf7c055082ef5c1a7e67c92 (patch) | |
tree | 985036edd60625e9a786f05d4b155273b1cfafcb /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | add a test that ensures that databases work if email is null. (diff) | |
download | opensim-SC-b84417a220a17539cdf7c055082ef5c1a7e67c92.zip opensim-SC-b84417a220a17539cdf7c055082ef5c1a7e67c92.tar.gz opensim-SC-b84417a220a17539cdf7c055082ef5c1a7e67c92.tar.bz2 opensim-SC-b84417a220a17539cdf7c055082ef5c1a7e67c92.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2561
* This is a partial implementation of llGetAnimation that returns the name of the animation as stored in data/avataranimations.xml but not its state name (since we don't yet
have these).
* Thanks StrawberryFride
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 15 |
1 files changed, 14 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 b16125b..778cf9f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3482,7 +3482,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3482 | { | 3482 | { |
3483 | // This should only return a value if the avatar is in the same region | 3483 | // This should only return a value if the avatar is in the same region |
3484 | m_host.AddScriptLPS(1); | 3484 | m_host.AddScriptLPS(1); |
3485 | NotImplemented("llGetAnimation"); | 3485 | UUID avatar = (UUID)id; |
3486 | ScenePresence presence = World.GetScenePresence(avatar); | ||
3487 | if (m_host.RegionHandle == presence.RegionHandle) | ||
3488 | { | ||
3489 | Dictionary<UUID, string> animationNames = AnimationSet.Animations.AnimsNames; | ||
3490 | |||
3491 | if (presence != null) | ||
3492 | { | ||
3493 | AnimationSet currentAnims = presence.Animations; | ||
3494 | string currentAnimation = String.Empty; | ||
3495 | if (animationNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimation)) | ||
3496 | return currentAnimation; | ||
3497 | } | ||
3498 | } | ||
3486 | return String.Empty; | 3499 | return String.Empty; |
3487 | } | 3500 | } |
3488 | 3501 | ||