diff options
author | Teravus Ovares | 2008-06-05 13:24:59 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-05 13:24:59 +0000 |
commit | e12baa5eb33882fc1d4c6aa0886037e00d726e2e (patch) | |
tree | 79c88e2ceef55f8430dec81b91e9086f2f5876e7 /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |
parent | * Don't create ghost prim when rezzing objects from inventory (diff) | |
download | opensim-SC_OLD-e12baa5eb33882fc1d4c6aa0886037e00d726e2e.zip opensim-SC_OLD-e12baa5eb33882fc1d4c6aa0886037e00d726e2e.tar.gz opensim-SC_OLD-e12baa5eb33882fc1d4c6aa0886037e00d726e2e.tar.bz2 opensim-SC_OLD-e12baa5eb33882fc1d4c6aa0886037e00d726e2e.tar.xz |
* This sends collision events to the script engine.
* Unfortunately, there's some kludges with the Async manager and the llDetected functions that I have yet to decipher... so llDetected functions don't work with collision events at the moment....
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 663ac0c..4c58e36 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -562,6 +562,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
562 | return resolveName(SensedUUID); | 562 | return resolveName(SensedUUID); |
563 | } | 563 | } |
564 | } | 564 | } |
565 | else | ||
566 | { | ||
567 | ScriptManager sm; | ||
568 | IScript script = null; | ||
569 | |||
570 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | ||
571 | { | ||
572 | if (sm.Scripts.ContainsKey(m_localID)) | ||
573 | { | ||
574 | if ((script = sm.GetScript(m_localID, m_itemID)) != null) | ||
575 | { | ||
576 | if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number]) | ||
577 | { | ||
578 | return script.llDetectParams._string[number]; | ||
579 | } | ||
580 | } | ||
581 | } | ||
582 | } | ||
583 | } | ||
565 | return String.Empty; | 584 | return String.Empty; |
566 | } | 585 | } |
567 | 586 | ||
@@ -587,9 +606,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
587 | { | 606 | { |
588 | if ((script = sm.GetScript(m_localID, m_itemID)) != null) | 607 | if ((script = sm.GetScript(m_localID, m_itemID)) != null) |
589 | { | 608 | { |
590 | if (script.llDetectParams._key[0]) | 609 | if (script.llDetectParams._bool.Length > number && script.llDetectParams._bool[number]) |
591 | { | 610 | { |
592 | return new LLUUID(script.llDetectParams._key[0]); | 611 | LLUUID returnUUID = LLUUID.Zero; |
612 | Helpers.TryParse(script.llDetectParams._key[number], out returnUUID); | ||
613 | |||
614 | return returnUUID; | ||
593 | } | 615 | } |
594 | } | 616 | } |
595 | } | 617 | } |
@@ -614,6 +636,35 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
614 | return SensedObject; | 636 | return SensedObject; |
615 | } | 637 | } |
616 | } | 638 | } |
639 | else | ||
640 | { | ||
641 | ScriptManager sm; | ||
642 | IScript script = null; | ||
643 | |||
644 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | ||
645 | { | ||
646 | if (sm.Scripts.ContainsKey(m_localID)) | ||
647 | { | ||
648 | if ((script = sm.GetScript(m_localID, m_itemID)) != null) | ||
649 | { | ||
650 | if (script.llDetectParams._key[number]) | ||
651 | { | ||
652 | EntityBase SensedObject = null; | ||
653 | LLUUID SensedUUID = LLUUID.Zero; | ||
654 | Helpers.TryParse(script.llDetectParams._key.ToString(), out SensedUUID); | ||
655 | if (SensedUUID == LLUUID.Zero) | ||
656 | return null; | ||
657 | lock (World.Entities) | ||
658 | { | ||
659 | World.Entities.TryGetValue(SensedUUID, out SensedObject); | ||
660 | } | ||
661 | return SensedObject; | ||
662 | |||
663 | } | ||
664 | } | ||
665 | } | ||
666 | } | ||
667 | } | ||
617 | return null; | 668 | return null; |
618 | } | 669 | } |
619 | 670 | ||