diff options
author | Charles Krinke | 2008-06-26 23:37:21 +0000 |
---|---|---|
committer | Charles Krinke | 2008-06-26 23:37:21 +0000 |
commit | 176efe3f0680aa7e1c46d9eb0fc1ead762512ac3 (patch) | |
tree | c91ecebc7898b5d0dbb833316f532dd5a036c3df /OpenSim | |
parent | Mantis#1603. Thank you, Matth for a patch to llGiveInventory (diff) | |
download | opensim-SC_OLD-176efe3f0680aa7e1c46d9eb0fc1ead762512ac3.zip opensim-SC_OLD-176efe3f0680aa7e1c46d9eb0fc1ead762512ac3.tar.gz opensim-SC_OLD-176efe3f0680aa7e1c46d9eb0fc1ead762512ac3.tar.bz2 opensim-SC_OLD-176efe3f0680aa7e1c46d9eb0fc1ead762512ac3.tar.xz |
Mantis#1610. Thank you, Melanie for a patch that:
Implements the beginning of llInventoryDrop. Doesn't cover
the actual dropping yet, just the permissions for it.
Diffstat (limited to '')
4 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index eac74c2..b67de7e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1009,8 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1009 | return; | 1009 | return; |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | // todo: also check llAllowInventoryDrop when implemented | 1012 | if(part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) |
1013 | if(part.OwnerID != destPart.OwnerID) | ||
1014 | { | 1013 | { |
1015 | // object cannot copy items to an object owned by a different owner | 1014 | // object cannot copy items to an object owned by a different owner |
1016 | // unless llAllowInventoryDrop has been called | 1015 | // unless llAllowInventoryDrop has been called |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 85351f4..1f5f00f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -97,6 +97,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
97 | 97 | ||
98 | // TODO: This needs to be persisted in next XML version update! | 98 | // TODO: This needs to be persisted in next XML version update! |
99 | [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; | 99 | [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; |
100 | [XmlIgnore] public bool AllowedDrop = false; | ||
100 | [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); | 101 | [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); |
101 | [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; | 102 | [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; |
102 | [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; | 103 | [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; |
@@ -2786,6 +2787,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2786 | objectflagupdate |= (uint) LLObject.ObjectFlags.Money; | 2787 | objectflagupdate |= (uint) LLObject.ObjectFlags.Money; |
2787 | } | 2788 | } |
2788 | 2789 | ||
2790 | if (AllowedDrop) | ||
2791 | { | ||
2792 | objectflagupdate |= (uint) LLObject.ObjectFlags.AllowInventoryDrop; | ||
2793 | } | ||
2794 | |||
2789 | if ( | 2795 | if ( |
2790 | ((m_aggregateScriptEvents & scriptEvents.collision) != 0) || | 2796 | ((m_aggregateScriptEvents & scriptEvents.collision) != 0) || |
2791 | ((m_aggregateScriptEvents & scriptEvents.collision_end) != 0) || | 2797 | ((m_aggregateScriptEvents & scriptEvents.collision_end) != 0) || |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 366b20c..b5a3ad9 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -3185,7 +3185,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3185 | public void llAllowInventoryDrop(int add) | 3185 | public void llAllowInventoryDrop(int add) |
3186 | { | 3186 | { |
3187 | m_host.AddScriptLPS(1); | 3187 | m_host.AddScriptLPS(1); |
3188 | NotImplemented("llAllowInventoryDrop"); | 3188 | |
3189 | if(add != 0) | ||
3190 | m_host.ParentGroup.RootPart.AllowedDrop = true; | ||
3191 | else | ||
3192 | m_host.ParentGroup.RootPart.AllowedDrop = false; | ||
3193 | |||
3189 | } | 3194 | } |
3190 | 3195 | ||
3191 | public LSL_Types.Vector3 llGetSunDirection() | 3196 | public LSL_Types.Vector3 llGetSunDirection() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1d4a72e..477c6a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3114,7 +3114,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3114 | public void llAllowInventoryDrop(int add) | 3114 | public void llAllowInventoryDrop(int add) |
3115 | { | 3115 | { |
3116 | m_host.AddScriptLPS(1); | 3116 | m_host.AddScriptLPS(1); |
3117 | NotImplemented("llAllowInventoryDrop"); | 3117 | |
3118 | if(add != 0) | ||
3119 | m_host.ParentGroup.RootPart.AllowedDrop = true; | ||
3120 | else | ||
3121 | m_host.ParentGroup.RootPart.AllowedDrop = false; | ||
3118 | } | 3122 | } |
3119 | 3123 | ||
3120 | public LSL_Types.Vector3 llGetSunDirection() | 3124 | public LSL_Types.Vector3 llGetSunDirection() |