From 10a37f5be4dd61607e6cc3f47cc356dd26cf504d Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 21 Sep 2010 02:08:55 +0200
Subject: Refactor script create permission into the perms module
---
.../World/Permissions/PermissionsModule.cs | 28 ++++++++++++++++++----
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 --------
2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 573a22a..9d134ac 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1780,10 +1780,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
- if ((int)InventoryType.LSL == invType)
- if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID))
- return false;
-
+ SceneObjectPart part = scene.GetSceneObjectPart(objectID);
+ ScenePresence p = scene.GetScenePresence(userID);
+
+ if (part == null || p == null)
+ return false;
+
+ if (!IsAdministrator(userID))
+ {
+ if (part.OwnerID != userID)
+ {
+ // Group permissions
+ if ((part.GroupID == UUID.Zero) || (p.ControllingClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0))
+ return false;
+ } else {
+ if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
+ return false;
+ }
+ if ((int)InventoryType.LSL == invType)
+ if (m_allowedScriptCreators == UserSet.Administrators)
+ return false;
+ }
+
return true;
}
@@ -1980,4 +1998,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return false;
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 8011154..d3a1447 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1533,16 +1533,6 @@ namespace OpenSim.Region.Framework.Scenes
if (part == null)
return;
- if (part.OwnerID != remoteClient.AgentId)
- {
- // Group permissions
- if ((part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0))
- return;
- } else {
- if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
- return;
- }
-
if (!Permissions.CanCreateObjectInventory(
itemBase.InvType, part.UUID, remoteClient.AgentId))
return;
--
cgit v1.1
From 14adf9080596934078bddd79261501b83ba13b55 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 21 Sep 2010 03:57:09 +0200
Subject: Fix a typo
---
OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 9d134ac..f5f3839 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
m_scene.Permissions.OnEditNotecard += CanEditNotecard; //NOT YET IMPLEMENTED
m_scene.Permissions.OnEditScript += CanEditScript; //NOT YET IMPLEMENTED
- m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; //NOT IMPLEMENTED HERE
+ m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory;
m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED
m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; //NOT YET IMPLEMENTED
m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; //NOT YET IMPLEMENTED
@@ -1780,8 +1780,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
- SceneObjectPart part = scene.GetSceneObjectPart(objectID);
- ScenePresence p = scene.GetScenePresence(userID);
+ SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
+ ScenePresence p = m_scene.GetScenePresence(userID);
if (part == null || p == null)
return false;
--
cgit v1.1
From 33ae5ad3091226ed0a3d069972af61db4df9a749 Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Thu, 23 Sep 2010 00:50:18 -0400
Subject: * Pushing the Community.CSharpSqlite.Sqlite dll's I built. This is
a slightly modified version of CSharpSqlite built in silverlight mode so that
it doesn't have the locking issues that it normally would under .NET and a
custom ADO.NET wrapper based on Mono.Data.Sqlite. I'm not entirely sure if
these will be kept here like this in debug mode with the pdb's Maybe to
start.. but after some testing we'll put them in release mode.
---
bin/Community.CsharpSqlite.Sqlite.dll | Bin 0 -> 39424 bytes
bin/Community.CsharpSqlite.Sqlite.pdb | Bin 0 -> 124416 bytes
bin/Community.CsharpSqlite.dll | Bin 0 -> 659456 bytes
bin/Community.CsharpSqlite.pdb | Bin 0 -> 1447424 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bin/Community.CsharpSqlite.Sqlite.dll
create mode 100644 bin/Community.CsharpSqlite.Sqlite.pdb
create mode 100644 bin/Community.CsharpSqlite.dll
create mode 100644 bin/Community.CsharpSqlite.pdb
diff --git a/bin/Community.CsharpSqlite.Sqlite.dll b/bin/Community.CsharpSqlite.Sqlite.dll
new file mode 100644
index 0000000..93ac7bd
Binary files /dev/null and b/bin/Community.CsharpSqlite.Sqlite.dll differ
diff --git a/bin/Community.CsharpSqlite.Sqlite.pdb b/bin/Community.CsharpSqlite.Sqlite.pdb
new file mode 100644
index 0000000..3920d80
Binary files /dev/null and b/bin/Community.CsharpSqlite.Sqlite.pdb differ
diff --git a/bin/Community.CsharpSqlite.dll b/bin/Community.CsharpSqlite.dll
new file mode 100644
index 0000000..a2e4513
Binary files /dev/null and b/bin/Community.CsharpSqlite.dll differ
diff --git a/bin/Community.CsharpSqlite.pdb b/bin/Community.CsharpSqlite.pdb
new file mode 100644
index 0000000..bb8c4e5
Binary files /dev/null and b/bin/Community.CsharpSqlite.pdb differ
--
cgit v1.1
From 983c6a74b15f566a9d2290b545f2b56b74f05f58 Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Thu, 23 Sep 2010 01:21:08 -0400
Subject: * Add CSharpSqlite to prebuild * Use a conditional define to
determine whether we're using CSharpSqlite or Mono.Data.Sqlite #if
CSharpSqlite using Community.CsharpSqlite.Sqlite; #else using
Mono.Data.Sqlite; #endif * Hopefully, this will restore sqlite functionality
on a Mac. In visual studio, you can edit the OpenSim.Data.SQLite project, go
to the Build tab and enter CSharpSqlite in the box. I'm not sure how to
define CSharpSqlite in Mono, someone better at it then me will have to take
the job of figuring out the best way to define it in Mono.
---
OpenSim/Data/SQLite/SQLiteAssetData.cs | 7 ++++++-
OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | 7 ++++++-
OpenSim/Data/SQLite/SQLiteAvatarData.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteEstateData.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteFramework.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteFriendsData.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteSimulationData.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteUserAccountData.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteUtils.cs | 6 +++++-
OpenSim/Data/SQLite/SQLiteXInventoryData.cs | 6 +++++-
prebuild.xml | 2 ++
13 files changed, 64 insertions(+), 12 deletions(-)
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 16e560c..5b71897 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -30,7 +30,12 @@ using System.Data;
using System.Reflection;
using System.Collections.Generic;
using log4net;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
+
using OpenMetaverse;
using OpenSim.Framework;
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index a1412ff..c54bd74 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -33,7 +33,12 @@ using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
-using Mono.Data.Sqlite;
+using log4net;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteAvatarData.cs b/OpenSim/Data/SQLite/SQLiteAvatarData.cs
index c093884..60a1a3e 100644
--- a/OpenSim/Data/SQLite/SQLiteAvatarData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAvatarData.cs
@@ -33,7 +33,11 @@ using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index d1d67eb..21556da 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
diff --git a/OpenSim/Data/SQLite/SQLiteFramework.cs b/OpenSim/Data/SQLite/SQLiteFramework.cs
index cf114d1..4992bcc 100644
--- a/OpenSim/Data/SQLite/SQLiteFramework.cs
+++ b/OpenSim/Data/SQLite/SQLiteFramework.cs
@@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteFriendsData.cs b/OpenSim/Data/SQLite/SQLiteFriendsData.cs
index b06853c..4bfd228 100644
--- a/OpenSim/Data/SQLite/SQLiteFriendsData.cs
+++ b/OpenSim/Data/SQLite/SQLiteFriendsData.cs
@@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 9b8e2fa..0d7b001 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index ecf8e02..d606f11 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
using OpenMetaverse;
using OpenSim.Framework;
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index ebe6da8..9d49fb6 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -32,7 +32,11 @@ using System.Drawing;
using System.IO;
using System.Reflection;
using log4net;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
index 2706aea..7a5de50 100644
--- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
@@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs
index 07c6b69..ca5861f 100644
--- a/OpenSim/Data/SQLite/SQLiteUtils.cs
+++ b/OpenSim/Data/SQLite/SQLiteUtils.cs
@@ -27,7 +27,11 @@
using System;
using System.Data;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
namespace OpenSim.Data.SQLite
{
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index ca651e1..ccbd86e 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -29,7 +29,11 @@ using System;
using System.Data;
using System.Reflection;
using System.Collections.Generic;
-using Mono.Data.Sqlite;
+#if CSharpSqlite
+ using Community.CsharpSqlite.Sqlite;
+#else
+ using Mono.Data.Sqlite;
+#endif
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
diff --git a/prebuild.xml b/prebuild.xml
index 726991c..530c417 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2217,6 +2217,8 @@
+
+
--
cgit v1.1
From acd5bbdb71682131be386b7a5ce1904622b0ee70 Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Thu, 23 Sep 2010 01:45:54 -0400
Subject: * One more item for CSharpSqlite * Hopefully this will enable mac
people to use SQLite again * Someone cooler then me will need to figure out
how to define CSharpSqlite with Mono so the conditional will pick up. *
There's also an error that occurs when you first load OpenSimulator under
CSharpSQLite that goes away after. * The databases are not byte for byte
compatible. Mono.Data.Sqlite is able to read CSharpSqlite made databases but
not the reverse way.
---
OpenSim/Data/SQLite/SQLiteEstateData.cs | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 21556da..63252aa 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -109,10 +109,17 @@ namespace OpenSim.Data.SQLite
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
+ IDataReader r = null;
+ try
+ {
+ r = cmd.ExecuteReader();
+ }
+ catch (SqliteException)
+ {
+ m_log.Error("[SQLITE]: There was an issue loading the estate settings. This can happen the first time running OpenSimulator with CSharpSqlite the first time. OpenSimulator will probably crash, restart it and it should be good to go.");
+ }
- IDataReader r = cmd.ExecuteReader();
-
- if (r.Read())
+ if (r != null && r.Read())
{
foreach (string name in FieldList)
{
--
cgit v1.1
From 8dc59f5b59eec82f2a53448eca7b9e528e8e99a1 Mon Sep 17 00:00:00 2001
From: Kevin Cozens
Date: Fri, 24 Sep 2010 10:26:53 -0400
Subject: Added delay for llSetPrimitiveParams() and llSetLinkPrimitiveParams()
functions per the LSL wiki.
Signed-off-by: Melanie
This patch also fixes a large amount of trailing whitespace. While this is
beneficial, it should really be in a separate patch that fixes whitespace only.
Just good practice.
---
.../Shared/Api/Implementation/LSL_Api.cs | 204 +++++++++++----------
1 file changed, 104 insertions(+), 100 deletions(-)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a6ca171..8bf9482 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -252,9 +252,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ScriptBaseClass.LINK_ALL_OTHERS:
if (m_host.ParentGroup == null)
return new List();
-
+
ret = new List(m_host.ParentGroup.Parts);
-
+
if (ret.Contains(m_host))
ret.Remove(m_host);
return ret;
@@ -262,9 +262,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ScriptBaseClass.LINK_ALL_CHILDREN:
if (m_host.ParentGroup == null)
return new List();
-
+
ret = new List(m_host.ParentGroup.Parts);
-
+
if (ret.Contains(m_host.ParentGroup.RootPart))
ret.Remove(m_host.ParentGroup.RootPart);
return ret;
@@ -1404,7 +1404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (face == ScriptBaseClass.ALL_SIDES)
face = SceneObjectPart.ALL_SIDES;
-
+
m_host.SetFaceColor(new Vector3((float)color.x, (float)color.y, (float)color.z), face);
}
@@ -2039,7 +2039,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//KF: Do NOT use this next line if using ODE physics engine. This need a switch based on .ini Phys Engine type
// part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
-
+
// So, after thinking about this for a bit, the issue with the part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition line
// is it isn't compatible with vehicles because it causes the vehicle body to have to be broken down and rebuilt
// It's perfectly okay when the object is not an active physical body though.
@@ -4009,7 +4009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case 1: // DATA_ONLINE (0|1)
if (pinfo != null && pinfo.RegionID != UUID.Zero)
reply = "1";
- else
+ else
reply = "0";
break;
case 2: // DATA_NAME (First Last)
@@ -4202,7 +4202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return currentAnimationState;
}
}
-
+
return String.Empty;
}
@@ -4317,7 +4317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
// Need provisions for Group Owned here
- if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
+ if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
{
pushAllowed = true;
@@ -4337,8 +4337,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
{
// Need provisions for Group Owned here
- if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
- targetlandObj.LandData.IsGroupOwned ||
+ if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
+ targetlandObj.LandData.IsGroupOwned ||
m_host.OwnerID == targetID)
{
pushAllowed = true;
@@ -4463,7 +4463,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return sides;
}
-
+
/* The new / changed functions were tested with the following LSL script:
@@ -5470,7 +5470,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
flags |= ScriptBaseClass.AGENT_SITTING;
}
- if (agent.Animator.Animations.DefaultAnimation.AnimID
+ if (agent.Animator.Animations.DefaultAnimation.AnimID
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
{
flags |= ScriptBaseClass.AGENT_SITTING;
@@ -5837,7 +5837,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
return World.SimulatorFPS;
}
-
+
/* particle system rules should be coming into this routine as doubles, that is
rule[0] should be an integer from this list and rule[1] should be the arg
@@ -5920,7 +5920,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
private void SetParticleSystem(SceneObjectPart part, LSL_List rules) {
-
+
if (rules.Length == 0)
{
part.RemoveParticleSystem();
@@ -6091,7 +6091,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (m_host.PhysActor != null)
{
float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
- float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
+ float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
PIDHoverType hoverType = PIDHoverType.Ground;
if (water != 0)
{
@@ -6105,7 +6105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
height += ground;
}
-
+
m_host.SetHoverHeight((float)height, hoverType, (float)tau);
}
}
@@ -6487,19 +6487,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (xmlRpcRouter != null)
{
string ExternalHostName = m_ScriptEngine.World.RegionInfo.ExternalHostName;
-
- xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID,
- m_itemID, String.Format("http://{0}:{1}/", ExternalHostName,
+
+ xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID,
+ m_itemID, String.Format("http://{0}:{1}/", ExternalHostName,
xmlrpcMod.Port.ToString()));
}
- object[] resobj = new object[]
- {
- new LSL_Integer(1),
- new LSL_String(channelID.ToString()),
- new LSL_String(UUID.Zero.ToString()),
- new LSL_String(String.Empty),
- new LSL_Integer(0),
- new LSL_String(String.Empty)
+ object[] resobj = new object[]
+ {
+ new LSL_Integer(1),
+ new LSL_String(channelID.ToString()),
+ new LSL_String(UUID.Zero.ToString()),
+ new LSL_String(String.Empty),
+ new LSL_Integer(0),
+ new LSL_String(String.Empty)
};
m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj,
new DetectParams[0]));
@@ -6874,6 +6874,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
SetPrimParams(m_host, rules);
+
+ ScriptSleep(200);
}
public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
@@ -6884,6 +6886,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach (SceneObjectPart part in parts)
SetPrimParams(part, rules);
+
+ ScriptSleep(200);
}
public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
@@ -7041,7 +7045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
radiusoffset = (float)rules.GetLSLFloatItem(idx++);
skew = (float)rules.GetLSLFloatItem(idx++);
part.Shape.PathCurve = (byte)Extrusion.Curve1;
- SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+ SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
revolutions, radiusoffset, skew, 0);
break;
@@ -7061,7 +7065,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
radiusoffset = (float)rules.GetLSLFloatItem(idx++);
skew = (float)rules.GetLSLFloatItem(idx++);
part.Shape.PathCurve = (byte)Extrusion.Curve1;
- SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+ SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
revolutions, radiusoffset, skew, 1);
break;
@@ -7081,7 +7085,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
radiusoffset = (float)rules.GetLSLFloatItem(idx++);
skew = (float)rules.GetLSLFloatItem(idx++);
part.Shape.PathCurve = (byte)Extrusion.Curve1;
- SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+ SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
revolutions, radiusoffset, skew, 3);
break;
@@ -7127,7 +7131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetAlpha(part, alpha, face);
break;
-
+
case (int)ScriptBaseClass.PRIM_FLEXIBLE:
if (remain < 7)
return;
@@ -7143,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);
break;
-
+
case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
if (remain < 5)
return;
@@ -7156,7 +7160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetPointLight(part, light, lightcolor, intensity, radius, falloff);
break;
-
+
case (int)ScriptBaseClass.PRIM_GLOW:
if (remain < 2)
return;
@@ -7166,7 +7170,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetGlow(part, face, glow);
break;
-
+
case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
if (remain < 3)
return;
@@ -7177,7 +7181,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetShiny(part, face, shiny, bump);
break;
-
+
case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
if (remain < 2)
return;
@@ -7185,7 +7189,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
bool st = rules.GetLSLIntegerItem(idx++);
SetFullBright(part, face , st);
break;
-
+
case (int)ScriptBaseClass.PRIM_MATERIAL:
if (remain < 1)
return;
@@ -7195,7 +7199,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.Material = Convert.ToByte(mat);
break;
-
+
case (int)ScriptBaseClass.PRIM_PHANTOM:
if (remain < 1)
return;
@@ -7210,7 +7214,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.ScriptSetPhantomStatus(phantom);
break;
-
+
case (int)ScriptBaseClass.PRIM_PHYSICS:
if (remain < 1)
return;
@@ -7224,7 +7228,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.ScriptSetPhysicsStatus(physics);
break;
-
+
case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
if (remain < 1)
return;
@@ -7350,7 +7354,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetRootPosition()
{
m_host.AddScriptLPS(1);
- return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y,
+ return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y,
m_host.ParentGroup.AbsolutePosition.Z);
}
@@ -7444,7 +7448,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
LSL_Vector lower;
LSL_Vector upper;
- if (presence.Animator.Animations.DefaultAnimation.AnimID
+ if (presence.Animator.Animations.DefaultAnimation.AnimID
== AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
{
// This is for ground sitting avatars
@@ -7643,8 +7647,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned
// byte is being used to represent the entire
// range of floating-point values from 1.0
- // through 4.0 (which is how SL does it).
-
+ // through 4.0 (which is how SL does it).
+
// float radiusoffset
res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));
@@ -7819,104 +7823,104 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// Assuming silently fail means give back an empty list. Ideally, need to check this.
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
return new LSL_List();
-
+
return GetPrimMediaParams(face, rules);
}
-
+
private LSL_List GetPrimMediaParams(int face, LSL_List rules)
{
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface();
if (null == module)
throw new Exception("Media on a prim functions not available");
-
+
MediaEntry me = module.GetMediaEntry(m_host, face);
-
+
// As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams
if (null == me)
return new LSL_List();
-
+
LSL_List res = new LSL_List();
for (int i = 0; i < rules.Length; i++)
{
int code = (int)rules.GetLSLIntegerItem(i);
-
+
switch (code)
{
case ScriptBaseClass.PRIM_MEDIA_ALT_IMAGE_ENABLE:
// Not implemented
res.Add(new LSL_Integer(0));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_CONTROLS:
if (me.Controls == MediaControls.Standard)
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_MEDIA_CONTROLS_STANDARD));
else
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_MEDIA_CONTROLS_MINI));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_CURRENT_URL:
res.Add(new LSL_String(me.CurrentURL));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_HOME_URL:
res.Add(new LSL_String(me.HomeURL));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_LOOP:
res.Add(me.AutoLoop ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_PLAY:
res.Add(me.AutoPlay ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_SCALE:
res.Add(me.AutoScale ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_ZOOM:
res.Add(me.AutoZoom ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_FIRST_CLICK_INTERACT:
res.Add(me.InteractOnFirstClick ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WIDTH_PIXELS:
res.Add(new LSL_Integer(me.Width));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_HEIGHT_PIXELS:
res.Add(new LSL_Integer(me.Height));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WHITELIST_ENABLE:
res.Add(me.EnableWhiteList ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WHITELIST:
string[] urls = (string[])me.WhiteList.Clone();
-
+
for (int j = 0; j < urls.Length; j++)
urls[j] = Uri.EscapeDataString(urls[j]);
-
+
res.Add(new LSL_String(string.Join(", ", urls)));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_PERMS_INTERACT:
res.Add(new LSL_Integer((int)me.InteractPermissions));
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
res.Add(new LSL_Integer((int)me.ControlPermissions));
break;
}
}
-
+
return res;
}
-
+
public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
{
m_host.AddScriptLPS(1);
@@ -7927,32 +7931,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// Don't perform the media check directly
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
return ScriptBaseClass.LSL_STATUS_OK;
-
+
return SetPrimMediaParams(face, rules);
}
-
+
private LSL_Integer SetPrimMediaParams(int face, LSL_List rules)
{
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface();
if (null == module)
throw new Exception("Media on a prim functions not available");
-
+
MediaEntry me = module.GetMediaEntry(m_host, face);
if (null == me)
me = new MediaEntry();
-
+
int i = 0;
-
+
while (i < rules.Length - 1)
{
int code = rules.GetLSLIntegerItem(i++);
-
+
switch (code)
{
case ScriptBaseClass.PRIM_MEDIA_ALT_IMAGE_ENABLE:
me.EnableAlterntiveImage = (rules.GetLSLIntegerItem(i++) != 0 ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_CONTROLS:
int v = rules.GetLSLIntegerItem(i++);
if (ScriptBaseClass.PRIM_MEDIA_CONTROLS_STANDARD == v)
@@ -7960,47 +7964,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
else
me.Controls = MediaControls.Mini;
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_CURRENT_URL:
me.CurrentURL = rules.GetLSLStringItem(i++);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_HOME_URL:
me.HomeURL = rules.GetLSLStringItem(i++);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_LOOP:
me.AutoLoop = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_PLAY:
me.AutoPlay = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_SCALE:
me.AutoScale = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_AUTO_ZOOM:
me.AutoZoom = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_FIRST_CLICK_INTERACT:
me.InteractOnFirstClick = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WIDTH_PIXELS:
me.Width = (int)rules.GetLSLIntegerItem(i++);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_HEIGHT_PIXELS:
me.Height = (int)rules.GetLSLIntegerItem(i++);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WHITELIST_ENABLE:
me.EnableWhiteList = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_WHITELIST:
string[] rawWhiteListUrls = rules.GetLSLStringItem(i++).ToString().Split(new char[] { ',' });
List whiteListUrls = new List();
@@ -8008,22 +8012,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
rawWhiteListUrls, delegate(string rawUrl) { whiteListUrls.Add(rawUrl.Trim()); });
me.WhiteList = whiteListUrls.ToArray();
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_PERMS_INTERACT:
me.InteractPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
break;
-
+
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
break;
}
}
-
+
module.SetMediaEntry(m_host, face, me);
-
+
return ScriptBaseClass.LSL_STATUS_OK;
}
-
+
public LSL_Integer llClearPrimMedia(LSL_Integer face)
{
m_host.AddScriptLPS(1);
@@ -8034,16 +8038,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// FIXME: Don't perform the media check directly
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
return ScriptBaseClass.LSL_STATUS_OK;
-
+
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface();
if (null == module)
throw new Exception("Media on a prim functions not available");
-
+
module.ClearMediaEntry(m_host, face);
-
+
return ScriptBaseClass.LSL_STATUS_OK;
}
-
+
//
//
// The .NET definition of base 64 is:
@@ -8303,7 +8307,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llGetHTTPHeader(LSL_Key request_id, string header)
{
m_host.AddScriptLPS(1);
-
+
if (m_UrlModule != null)
return m_UrlModule.GetHttpHeader(new UUID(request_id), header);
return String.Empty;
@@ -8492,19 +8496,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return tokens;
}
-
+
public LSL_List llParseString2List(string src, LSL_List separators, LSL_List spacers)
{
m_host.AddScriptLPS(1);
return this.ParseString(src, separators, spacers, false);
}
-
+
public LSL_List llParseStringKeepNulls(string src, LSL_List separators, LSL_List spacers)
{
m_host.AddScriptLPS(1);
return this.ParseString(src, separators, spacers, true);
}
-
+
public LSL_Integer llGetObjectPermMask(int mask)
{
m_host.AddScriptLPS(1);
--
cgit v1.1