aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs55
1 files changed, 2 insertions, 53 deletions
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
563 return resolveName(SensedUUID); 563 return resolveName(SensedUUID);
564 } 564 }
565 } 565 }
566 else
567 {
568 ScriptManager sm;
569 IScript script = null;
570
571 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
572 {
573 if (sm.Scripts.ContainsKey(m_localID))
574 {
575 if ((script = sm.GetScript(m_localID, m_itemID)) != null)
576 {
577 if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number])
578 {
579 return script.llDetectParams._string[number];
580 }
581 }
582 }
583 }
584 }
585 return String.Empty; 566 return String.Empty;
586 } 567 }
587 568
@@ -607,12 +588,9 @@ namespace OpenSim.Region.ScriptEngine.Common
607 { 588 {
608 if ((script = sm.GetScript(m_localID, m_itemID)) != null) 589 if ((script = sm.GetScript(m_localID, m_itemID)) != null)
609 { 590 {
610 if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number]) 591 if (script.llDetectParams._key[0])
611 { 592 {
612 LLUUID returnUUID = LLUUID.Zero; 593 return new LLUUID(script.llDetectParams._key[0]);
613 Helpers.TryParse(script.llDetectParams._key[number], out returnUUID);
614
615 return returnUUID;
616 } 594 }
617 } 595 }
618 } 596 }
@@ -637,35 +615,6 @@ namespace OpenSim.Region.ScriptEngine.Common
637 return SensedObject; 615 return SensedObject;
638 } 616 }
639 } 617 }
640 else
641 {
642 ScriptManager sm;
643 IScript script = null;
644
645 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
646 {
647 if (sm.Scripts.ContainsKey(m_localID))
648 {
649 if ((script = sm.GetScript(m_localID, m_itemID)) != null)
650 {
651 if (script.llDetectParams._key[number])
652 {
653 EntityBase SensedObject = null;
654 LLUUID SensedUUID = LLUUID.Zero;
655 Helpers.TryParse(script.llDetectParams._key.ToString(), out SensedUUID);
656 if (SensedUUID == LLUUID.Zero)
657 return null;
658 lock (World.Entities)
659 {
660 World.Entities.TryGetValue(SensedUUID, out SensedObject);
661 }
662 return SensedObject;
663
664 }
665 }
666 }
667 }
668 }
669 return null; 618 return null;
670 } 619 }
671 620