aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-08 22:53:52 +0000
committerTeravus Ovares2008-06-08 22:53:52 +0000
commit6ecb7c05b348800e2148f1dad43c41b8ccd44a9b (patch)
tree3efec2d74a7932ab2a7cd8d9afe4640083e31a2a /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
parent* Added compiler pre-processor, #if SPAM to SensorRepeat... so if you really... (diff)
downloadopensim-SC-6ecb7c05b348800e2148f1dad43c41b8ccd44a9b.zip
opensim-SC-6ecb7c05b348800e2148f1dad43c41b8ccd44a9b.tar.gz
opensim-SC-6ecb7c05b348800e2148f1dad43c41b8ccd44a9b.tar.bz2
opensim-SC-6ecb7c05b348800e2148f1dad43c41b8ccd44a9b.tar.xz
* Fixed it so you can do a lot more llDetected* methods in many additional situations and have it work.
* script Collision reporting works now in DotNetEngine
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs64
1 files changed, 62 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 2ac074f..688354c 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -563,6 +563,32 @@ 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 //System.Console.WriteLine(number + " - " + script.llDetectParams._key.Length);
578 if (script.llDetectParams._string != null)
579 {
580 if (script.llDetectParams._string.Length > number)
581 {
582 if (script.llDetectParams._string[number] != null)
583 {
584 return script.llDetectParams._string[number];
585 }
586 }
587 }
588 }
589 }
590 }
591 }
566 return String.Empty; 592 return String.Empty;
567 } 593 }
568 594
@@ -588,9 +614,13 @@ namespace OpenSim.Region.ScriptEngine.Common
588 { 614 {
589 if ((script = sm.GetScript(m_localID, m_itemID)) != null) 615 if ((script = sm.GetScript(m_localID, m_itemID)) != null)
590 { 616 {
591 if (script.llDetectParams._key[0]) 617 //System.Console.WriteLine(number + " - " + script.llDetectParams._key.Length);
618 if (script.llDetectParams._key.Length > number)
592 { 619 {
593 return new LLUUID(script.llDetectParams._key[0]); 620 if (script.llDetectParams._key[number])
621 {
622 return new LLUUID(script.llDetectParams._key[number]);
623 }
594 } 624 }
595 } 625 }
596 } 626 }
@@ -615,6 +645,36 @@ namespace OpenSim.Region.ScriptEngine.Common
615 return SensedObject; 645 return SensedObject;
616 } 646 }
617 } 647 }
648 else
649 {
650 ScriptManager sm;
651 IScript script = null;
652
653 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
654 {
655 if (sm.Scripts.ContainsKey(m_localID))
656 {
657 if ((script = sm.GetScript(m_localID, m_itemID)) != null)
658 {
659 //System.Console.WriteLine(number + " - " + script.llDetectParams._key.Length);
660 if (script.llDetectParams._key.Length > number)
661 {
662 if (script.llDetectParams._key[number])
663 {
664 LLUUID SensedUUID = new LLUUID(script.llDetectParams._key[number]);
665 EntityBase SensedObject = null;
666 lock (World.Entities)
667 {
668 World.Entities.TryGetValue(SensedUUID, out SensedObject);
669 }
670 return SensedObject;
671 }
672 }
673 }
674 }
675 }
676 }
677
618 return null; 678 return null;
619 } 679 }
620 680