aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2009-12-31 04:48:59 +0000
committerMelanie2009-12-31 04:48:59 +0000
commiteab2b4c6a96cd5b2a0f079f27a9c2ac15273d3f0 (patch)
treebbc37e3ea0845dcd599ff9f62d53e9d9ed42746c /OpenSim/Region/ScriptEngine
parentAdds osKickUser and osSetSpeed (diff)
downloadopensim-SC_OLD-eab2b4c6a96cd5b2a0f079f27a9c2ac15273d3f0.zip
opensim-SC_OLD-eab2b4c6a96cd5b2a0f079f27a9c2ac15273d3f0.tar.gz
opensim-SC_OLD-eab2b4c6a96cd5b2a0f079f27a9c2ac15273d3f0.tar.bz2
opensim-SC_OLD-eab2b4c6a96cd5b2a0f079f27a9c2ac15273d3f0.tar.xz
[PATCH] Adds llCollisionFilter
Thank you, Revolution. Applied with minor changes.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs48
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 6102504..43df4ab 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2752,7 +2752,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2752 public void llCollisionFilter(string name, string id, int accept) 2752 public void llCollisionFilter(string name, string id, int accept)
2753 { 2753 {
2754 m_host.AddScriptLPS(1); 2754 m_host.AddScriptLPS(1);
2755 NotImplemented("llCollisionFilter"); 2755 m_host.CollisionFilter.Clear();
2756 if(id != null)
2757 {
2758 m_host.CollisionFilter.Add(accept,id);
2759 }
2760 else
2761 {
2762 m_host.CollisionFilter.Add(accept,name);
2763 }
2756 } 2764 }
2757 2765
2758 public void llTakeControls(int controls, int accept, int pass_on) 2766 public void llTakeControls(int controls, int accept, int pass_on)
@@ -8204,11 +8212,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8204 8212
8205 return -1; 8213 return -1;
8206 } 8214 }
8207 8215
8208 public void llSetInventoryPermMask(string item, int mask, int value) 8216 public void llSetInventoryPermMask(string item, int mask, int value)
8209 { 8217 {
8210 m_host.AddScriptLPS(1); 8218 m_host.AddScriptLPS(1);
8211 NotImplemented("llSetInventoryPermMask"); 8219 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
8220 {
8221 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
8222 {
8223 lock (m_host.TaskInventory)
8224 {
8225 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
8226 {
8227 if (inv.Value.Name == item)
8228 {
8229 switch (mask)
8230 {
8231 case 0:
8232 inv.Value.BasePermissions = (uint)value;
8233 break;
8234 case 1:
8235 inv.Value.CurrentPermissions = (uint)value;
8236 break;
8237 case 2:
8238 inv.Value.GroupPermissions = (uint)value;
8239 break;
8240 case 3:
8241 inv.Value.EveryonePermissions = (uint)value;
8242 break;
8243 case 4:
8244 inv.Value.NextPermissions = (uint)value;
8245 break;
8246 }
8247 }
8248 }
8249 }
8250 }
8251 }
8212 } 8252 }
8213 8253
8214 public LSL_String llGetInventoryCreator(string item) 8254 public LSL_String llGetInventoryCreator(string item)