Allow llMapDestination to be used in any event if the host is an attachment. This fixes Mantis 0000098.

avinationmerge
Tom Grimshaw 2010-06-16 08:32:47 -07:00
parent 0b75f759b4
commit 117fd629d6
1 changed files with 14 additions and 2 deletions

View File

@ -9470,8 +9470,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0);
if (detectedParams == null) return; // only works on the first detected avatar if (detectedParams == null)
{
if (m_host.IsAttachment == true)
{
detectedParams = new DetectParams();
detectedParams.Key = m_host.OwnerID;
}
else
{
return;
}
}
ScenePresence avatar = World.GetScenePresence(detectedParams.Key); ScenePresence avatar = World.GetScenePresence(detectedParams.Key);
if (avatar != null) if (avatar != null)
{ {
@ -9479,6 +9490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)pos.x, (float)pos.y, (float)pos.z),
new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z));
} }
ScriptSleep(1000); ScriptSleep(1000);
} }