From 689969e143dad47fd9c257f9824ec71e3fafc8e6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Jun 2013 02:50:39 +0100 Subject: * This fixes having to select and deselect prim to get keyframemotion to start running when pulled from data storage. Conflicts: OpenSim/Data/SQLite/SQLiteSimulationData.cs --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 2 -- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 3 +++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 5320543..537ec85 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -458,8 +458,6 @@ namespace OpenSim.Data.MySQL if (prim.ParentUUID == UUID.Zero) { objects[prim.UUID] = new SceneObjectGroup(prim); - if (prim.KeyframeMotion != null) - prim.KeyframeMotion.UpdateSceneObject(objects[prim.UUID]); } } diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 99a6598..76f717d 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -732,9 +732,12 @@ namespace OpenSim.Data.SQLite } SceneObjectGroup group = new SceneObjectGroup(prim); + createdObjects.Add(group.UUID, group); retvals.Add(group); LoadItems(prim); + + } } catch (Exception e) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0ea4e09..a99261f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1072,6 +1072,11 @@ namespace OpenSim.Region.Framework.Scenes for (int i = 0; i < parts.Length; i++) { SceneObjectPart part = parts[i]; + if (part.KeyframeMotion != null) + { + part.KeyframeMotion.UpdateSceneObject(this); + } + if (Object.ReferenceEquals(part, m_rootPart)) continue; -- cgit v1.1 From 62c277ff9f7a335e0091bba0c891e5b739c656d6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Jun 2013 02:52:11 +0200 Subject: Add a result param to te money module interface --- OpenSim/Framework/IMoneyModule.cs | 2 +- .../Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 3 ++- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs index 415b7df..55c9613 100644 --- a/OpenSim/Framework/IMoneyModule.cs +++ b/OpenSim/Framework/IMoneyModule.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework public interface IMoneyModule { bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, - int amount, UUID txn); + int amount, UUID txn, out string reason); int GetBalance(UUID agentID); bool UploadCovered(UUID agentID, int amount); diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 0c9fdb9..5d10e93 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -203,8 +203,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule { } - public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn) + public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result) { + result = String.Empty; string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5ea14c7..4d03da1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3109,8 +3109,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } + string reason; money.ObjectGiveMoney( - m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); + m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero, out reason); }); return 0; @@ -12784,8 +12785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } + string reason; bool result = money.ObjectGiveMoney( - m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn); + m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason); if (result) { -- cgit v1.1 From 0be80e58133bc049be82201e9778ad74e3675529 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 13 Jun 2013 02:52:51 +0200 Subject: Forward the reason to the script --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4d03da1..e8502ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -12795,7 +12795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } - replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS"; + replydata = reason; } finally { -- cgit v1.1 From c78cb96c62c0a62499e8af9d0bde725276ce19fe Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 18 Jun 2013 04:42:20 +0200 Subject: Allow coalesced objects to be rezzed even if they extend past the sim bounds --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index ea22772..d09ea3e 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -788,6 +788,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlData); XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); + Vector3 rez_pos; if (e == null || attachment) // Single { SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); @@ -809,6 +810,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess RayStart, RayEnd, RayTargetID, Quaternion.Identity, BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); pos.Z += offsetHeight; + rez_pos = pos; } else { @@ -823,6 +825,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess BypassRayCast, bRayEndIsIntersection, true, bbox, false); + rez_pos = pos; + pos -= bbox / 2; XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); @@ -859,7 +863,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess primcount += g.PrimCount; if (!m_Scene.Permissions.CanRezObject( - primcount, remoteClient.AgentId, pos) + primcount, remoteClient.AgentId, rez_pos) && !attachment) { // The client operates in no fail mode. It will @@ -876,7 +880,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return null; } - if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) + if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, attachment)) return null; for (int i = 0; i < objlist.Count; i++) -- cgit v1.1 From 8e9d6c6c56c7169adfa4b99c328933df4b68107b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 23 Jun 2013 01:14:07 +0200 Subject: Fix prim locking to behave like SL --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a99261f..f306651 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3488,8 +3488,8 @@ namespace OpenSim.Region.Framework.Scenes part.ClonePermissions(RootPart); }); - uint lockMask = ~(uint)PermissionMask.Move; - uint lockBit = RootPart.OwnerMask & (uint)PermissionMask.Move; + uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify); + uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify); RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); RootPart.ScheduleFullUpdate(); } -- cgit v1.1