* Fixes llDetectedKey.

0.6.0-stable
Teravus Ovares 2008-06-08 19:54:49 +00:00
parent aca872499f
commit 524998ba3e
1 changed files with 2 additions and 53 deletions

View File

@ -563,25 +563,6 @@ namespace OpenSim.Region.ScriptEngine.Common
return resolveName(SensedUUID); return resolveName(SensedUUID);
} }
} }
else
{
ScriptManager sm;
IScript script = null;
if ((sm = m_ScriptEngine.m_ScriptManager) != null)
{
if (sm.Scripts.ContainsKey(m_localID))
{
if ((script = sm.GetScript(m_localID, m_itemID)) != null)
{
if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number])
{
return script.llDetectParams._string[number];
}
}
}
}
}
return String.Empty; return String.Empty;
} }
@ -607,12 +588,9 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
if ((script = sm.GetScript(m_localID, m_itemID)) != null) if ((script = sm.GetScript(m_localID, m_itemID)) != null)
{ {
if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number]) if (script.llDetectParams._key[0])
{ {
LLUUID returnUUID = LLUUID.Zero; return new LLUUID(script.llDetectParams._key[0]);
Helpers.TryParse(script.llDetectParams._key[number], out returnUUID);
return returnUUID;
} }
} }
} }
@ -637,35 +615,6 @@ namespace OpenSim.Region.ScriptEngine.Common
return SensedObject; return SensedObject;
} }
} }
else
{
ScriptManager sm;
IScript script = null;
if ((sm = m_ScriptEngine.m_ScriptManager) != null)
{
if (sm.Scripts.ContainsKey(m_localID))
{
if ((script = sm.GetScript(m_localID, m_itemID)) != null)
{
if (script.llDetectParams._key[number])
{
EntityBase SensedObject = null;
LLUUID SensedUUID = LLUUID.Zero;
Helpers.TryParse(script.llDetectParams._key.ToString(), out SensedUUID);
if (SensedUUID == LLUUID.Zero)
return null;
lock (World.Entities)
{
World.Entities.TryGetValue(SensedUUID, out SensedObject);
}
return SensedObject;
}
}
}
}
}
return null; return null;
} }