diff options
author | Teravus Ovares | 2008-06-08 19:54:49 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-08 19:54:49 +0000 |
commit | 524998ba3e925a4b6080a3748f03122c326652ed (patch) | |
tree | 60b1b22dbf1bbd659c8d278d44b6e84158ef1484 /OpenSim | |
parent | Added a "if(entity != null)" before the call to (diff) | |
download | opensim-SC-524998ba3e925a4b6080a3748f03122c326652ed.zip opensim-SC-524998ba3e925a4b6080a3748f03122c326652ed.tar.gz opensim-SC-524998ba3e925a4b6080a3748f03122c326652ed.tar.bz2 opensim-SC-524998ba3e925a4b6080a3748f03122c326652ed.tar.xz |
* Fixes llDetectedKey.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 55 |
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 | ||