From 524998ba3e925a4b6080a3748f03122c326652ed Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 8 Jun 2008 19:54:49 +0000 Subject: * Fixes llDetectedKey. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 55 +--------------------- 1 file changed, 2 insertions(+), 53 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 3260dad..2ac074f 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -563,25 +563,6 @@ namespace OpenSim.Region.ScriptEngine.Common 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; } @@ -607,12 +588,9 @@ namespace OpenSim.Region.ScriptEngine.Common { 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; - Helpers.TryParse(script.llDetectParams._key[number], out returnUUID); - - return returnUUID; + return new LLUUID(script.llDetectParams._key[0]); } } } @@ -637,35 +615,6 @@ namespace OpenSim.Region.ScriptEngine.Common 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; } -- cgit v1.1