diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-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 | ||