diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c251a49..d06b134 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2983,17 +2983,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2983 | 2983 | ||
2984 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) | 2984 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) |
2985 | { | 2985 | { |
2986 | SceneObjectGroup grp = m_host.ParentGroup; | ||
2987 | UUID itemID = grp.GetFromItemID(); | ||
2988 | |||
2989 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | ||
2990 | |||
2991 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | 2986 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; |
2992 | if (attachmentsModule != null) | 2987 | if (attachmentsModule != null) |
2993 | attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); | 2988 | Util.FireAndForget(DetachWrapper, m_host); |
2994 | } | 2989 | } |
2995 | } | 2990 | } |
2996 | 2991 | ||
2992 | private void DetachWrapper(object o) | ||
2993 | { | ||
2994 | SceneObjectPart host = (SceneObjectPart)o; | ||
2995 | |||
2996 | SceneObjectGroup grp = host.ParentGroup; | ||
2997 | UUID itemID = grp.GetFromItemID(); | ||
2998 | ScenePresence presence = World.GetScenePresence(host.OwnerID); | ||
2999 | |||
3000 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | ||
3001 | if (attachmentsModule != null) | ||
3002 | attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); | ||
3003 | } | ||
3004 | |||
2997 | public void llTakeCamera(string avatar) | 3005 | public void llTakeCamera(string avatar) |
2998 | { | 3006 | { |
2999 | m_host.AddScriptLPS(1); | 3007 | m_host.AddScriptLPS(1); |
@@ -8742,24 +8750,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8742 | 8750 | ||
8743 | switch (data) | 8751 | switch (data) |
8744 | { | 8752 | { |
8745 | case 5: // DATA_SIM_POS | 8753 | case ScriptBaseClass.DATA_SIM_POS: |
8746 | if (info == null) | 8754 | if (info == null) |
8747 | { | 8755 | { |
8748 | ScriptSleep(1000); | 8756 | ScriptSleep(1000); |
8749 | return UUID.Zero.ToString(); | 8757 | return UUID.Zero.ToString(); |
8750 | } | 8758 | } |
8751 | reply = new LSL_Vector( | 8759 | reply = new LSL_Vector( |
8752 | info.RegionLocX * Constants.RegionSize, | 8760 | info.RegionLocX, |
8753 | info.RegionLocY * Constants.RegionSize, | 8761 | info.RegionLocY, |
8754 | 0).ToString(); | 8762 | 0).ToString(); |
8755 | break; | 8763 | break; |
8756 | case 6: // DATA_SIM_STATUS | 8764 | case ScriptBaseClass.DATA_SIM_STATUS: |
8757 | if (info != null) | 8765 | if (info != null) |
8758 | reply = "up"; // Duh! | 8766 | reply = "up"; // Duh! |
8759 | else | 8767 | else |
8760 | reply = "unknown"; | 8768 | reply = "unknown"; |
8761 | break; | 8769 | break; |
8762 | case 7: // DATA_SIM_RATING | 8770 | case ScriptBaseClass.DATA_SIM_RATING: |
8763 | if (info == null) | 8771 | if (info == null) |
8764 | { | 8772 | { |
8765 | ScriptSleep(1000); | 8773 | ScriptSleep(1000); |
@@ -8775,7 +8783,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8775 | else | 8783 | else |
8776 | reply = "UNKNOWN"; | 8784 | reply = "UNKNOWN"; |
8777 | break; | 8785 | break; |
8778 | case 128: | 8786 | case ScriptBaseClass.DATA_SIM_RELEASE: |
8779 | if (ossl != null) | 8787 | if (ossl != null) |
8780 | ossl.CheckThreatLevel(ThreatLevel.High, "llRequestSimulatorData"); | 8788 | ossl.CheckThreatLevel(ThreatLevel.High, "llRequestSimulatorData"); |
8781 | reply = "OpenSim"; | 8789 | reply = "OpenSim"; |