diff options
author | Melanie | 2009-12-31 04:53:05 +0000 |
---|---|---|
committer | Melanie | 2009-12-31 04:53:05 +0000 |
commit | 643cc7a0ee19dd6670d674eca5ed039c652f14bf (patch) | |
tree | 4ae205fa5e0aad244c7a41b47cf7e3cf147bdb8a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
parent | [PATCH] Adds llCollisionFilter (diff) | |
download | opensim-SC-643cc7a0ee19dd6670d674eca5ed039c652f14bf.zip opensim-SC-643cc7a0ee19dd6670d674eca5ed039c652f14bf.tar.gz opensim-SC-643cc7a0ee19dd6670d674eca5ed039c652f14bf.tar.bz2 opensim-SC-643cc7a0ee19dd6670d674eca5ed039c652f14bf.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3a229c2..f0d73d3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2812,7 +2812,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2812 | public void llCollisionFilter(string name, string id, int accept) | 2812 | public void llCollisionFilter(string name, string id, int accept) |
2813 | { | 2813 | { |
2814 | m_host.AddScriptLPS(1); | 2814 | m_host.AddScriptLPS(1); |
2815 | NotImplemented("llCollisionFilter"); | 2815 | m_host.CollisionFilter.Clear(); |
2816 | if(id != null) | ||
2817 | { | ||
2818 | m_host.CollisionFilter.Add(accept,id); | ||
2819 | } | ||
2820 | else | ||
2821 | { | ||
2822 | m_host.CollisionFilter.Add(accept,name); | ||
2823 | } | ||
2816 | } | 2824 | } |
2817 | 2825 | ||
2818 | public void llTakeControls(int controls, int accept, int pass_on) | 2826 | public void llTakeControls(int controls, int accept, int pass_on) |
@@ -8323,11 +8331,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8323 | 8331 | ||
8324 | return -1; | 8332 | return -1; |
8325 | } | 8333 | } |
8326 | 8334 | ||
8327 | public void llSetInventoryPermMask(string item, int mask, int value) | 8335 | public void llSetInventoryPermMask(string item, int mask, int value) |
8328 | { | 8336 | { |
8329 | m_host.AddScriptLPS(1); | 8337 | m_host.AddScriptLPS(1); |
8330 | NotImplemented("llSetInventoryPermMask"); | 8338 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
8339 | { | ||
8340 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | ||
8341 | { | ||
8342 | lock (m_host.TaskInventory) | ||
8343 | { | ||
8344 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
8345 | { | ||
8346 | if (inv.Value.Name == item) | ||
8347 | { | ||
8348 | switch (mask) | ||
8349 | { | ||
8350 | case 0: | ||
8351 | inv.Value.BasePermissions = (uint)value; | ||
8352 | break; | ||
8353 | case 1: | ||
8354 | inv.Value.CurrentPermissions = (uint)value; | ||
8355 | break; | ||
8356 | case 2: | ||
8357 | inv.Value.GroupPermissions = (uint)value; | ||
8358 | break; | ||
8359 | case 3: | ||
8360 | inv.Value.EveryonePermissions = (uint)value; | ||
8361 | break; | ||
8362 | case 4: | ||
8363 | inv.Value.NextPermissions = (uint)value; | ||
8364 | break; | ||
8365 | } | ||
8366 | } | ||
8367 | } | ||
8368 | } | ||
8369 | } | ||
8370 | } | ||
8331 | } | 8371 | } |
8332 | 8372 | ||
8333 | public LSL_String llGetInventoryCreator(string item) | 8373 | public LSL_String llGetInventoryCreator(string item) |