diff options
author | Tom Grimshaw | 2010-06-16 08:32:47 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-06-16 08:32:47 -0700 |
commit | 117fd629d68ef8ab373b70fd5e9e6a643e8eaa65 (patch) | |
tree | 034ba389688cf5d0e4eeaf69d643147c2c10e588 /OpenSim/Region/ScriptEngine/Shared | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-117fd629d68ef8ab373b70fd5e9e6a643e8eaa65.zip opensim-SC-117fd629d68ef8ab373b70fd5e9e6a643e8eaa65.tar.gz opensim-SC-117fd629d68ef8ab373b70fd5e9e6a643e8eaa65.tar.bz2 opensim-SC-117fd629d68ef8ab373b70fd5e9e6a643e8eaa65.tar.xz |
Allow llMapDestination to be used in any event if the host is an attachment. This fixes Mantis 0000098.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9f3e354..c332fd8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9470,8 +9470,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9470 | { | 9470 | { |
9471 | m_host.AddScriptLPS(1); | 9471 | m_host.AddScriptLPS(1); |
9472 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0); | 9472 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0); |
9473 | if (detectedParams == null) return; // only works on the first detected avatar | 9473 | if (detectedParams == null) |
9474 | 9474 | { | |
9475 | if (m_host.IsAttachment == true) | ||
9476 | { | ||
9477 | detectedParams = new DetectParams(); | ||
9478 | detectedParams.Key = m_host.OwnerID; | ||
9479 | } | ||
9480 | else | ||
9481 | { | ||
9482 | return; | ||
9483 | } | ||
9484 | } | ||
9485 | |||
9475 | ScenePresence avatar = World.GetScenePresence(detectedParams.Key); | 9486 | ScenePresence avatar = World.GetScenePresence(detectedParams.Key); |
9476 | if (avatar != null) | 9487 | if (avatar != null) |
9477 | { | 9488 | { |
@@ -9479,6 +9490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9479 | new Vector3((float)pos.x, (float)pos.y, (float)pos.z), | 9490 | new Vector3((float)pos.x, (float)pos.y, (float)pos.z), |
9480 | new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); | 9491 | new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); |
9481 | } | 9492 | } |
9493 | |||
9482 | ScriptSleep(1000); | 9494 | ScriptSleep(1000); |
9483 | } | 9495 | } |
9484 | 9496 | ||