From 2e31f12cf48deaa8ed98c35207e8e288a30d0841 Mon Sep 17 00:00:00 2001 From: Bo Iwu Date: Sat, 28 Jan 2012 11:11:15 +0100 Subject: [PATCH 1/4] Send CHANGED_TELEPORT during local TP again - partially revert cf73afec356eed30e169be3ce71edad89b4fdb37 Signed-off-by: BlueWall --- .../Framework/EntityTransfer/EntityTransferModule.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index cbef6ce47b..928bcd0c81 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -208,8 +208,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer foreach (SceneObjectGroup grp in sp.GetAttachments()) { - if (grp.IsDeleted) - sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); + sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); } } else // Another region possibly in another simulator From ae057a7589c3c2fa5f12e028db8ddc3e7832e92c Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 28 Jan 2012 10:36:39 -0500 Subject: [PATCH 2/4] Adding our parcel's generated id to map packets --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 4ae96f011a..eac2743b20 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap mapitem.x = (uint)(xstart + x); mapitem.y = (uint)(ystart + y); // mapitem.z = (uint)m_scene.GetGroundHeight(x,y); - mapitem.id = UUID.Zero; + mapitem.id = parcel.GlobalID; mapitem.name = parcel.Name; mapitem.Extra = parcel.Area; mapitem.Extra2 = parcel.SalePrice; @@ -1291,7 +1291,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap responsemapdata["X"] = OSD.FromInteger((int)(xstart + x)); responsemapdata["Y"] = OSD.FromInteger((int)(ystart + y)); // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); - responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); + responsemapdata["ID"] = OSD.FromUUID(parcel.GlobalID); responsemapdata["Name"] = OSD.FromString(parcel.Name); responsemapdata["Extra"] = OSD.FromInteger(parcel.Area); responsemapdata["Extra2"] = OSD.FromInteger(parcel.SalePrice); From e8b688b61f53e770ad2fbe3764f75e615e9b2bf8 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Sun, 29 Jan 2012 20:15:43 +0100 Subject: [PATCH 3/4] Fix:Get embedded objects in notecard http://opensimulator.org/mantis/view.php?id=2607 Signed-off-by: nebadon --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 71 +++++++++++++++++++ bin/OpenSimDefaults.ini | 2 +- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 7bc59fc81d..cf0c28b8a8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -94,6 +94,7 @@ namespace OpenSim.Region.ClientStack.Linden private static readonly string m_notecardUpdatePath = "0004/"; private static readonly string m_notecardTaskUpdatePath = "0005/"; // private static readonly string m_fetchInventoryPath = "0006/"; + private static readonly string m_copyFromNotecardPath = "0007/"; // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. @@ -180,6 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); + m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard)); // As of RC 1.22.9 of the Linden client this is // supported @@ -723,6 +725,75 @@ namespace OpenSim.Region.ClientStack.Linden return LLSDHelpers.SerialiseLLSDReply(uploadResponse); } + + /// + /// Called by the CopyInventoryFromNotecard caps handler. + /// + /// + /// + /// + public string CopyInventoryFromNotecard(string request, string path, string param, + IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + Hashtable response = new Hashtable(); + response["int_response_code"] = 404; + response["content_type"] = "text/plain"; + response["keepalive"] = false; + response["str_response_string"] = ""; + + try + { + OSDMap content = (OSDMap)OSDParser.DeserializeLLSDXml(request); + UUID objectID = content["object-id"].AsUUID(); + UUID notecardID = content["notecard-id"].AsUUID(); + UUID folderID = content["folder-id"].AsUUID(); + UUID itemID = content["item-id"].AsUUID(); + + // m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, FolderID:{0}, ItemID:{1}, NotecardID:{2}, ObjectID:{3}", folderID, itemID, notecardID, objectID); + + if (objectID != UUID.Zero) + { + SceneObjectPart part = m_Scene.GetSceneObjectPart(objectID); + if (part != null) + { + TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(notecardID); + if (!m_Scene.Permissions.CanCopyObjectInventory(notecardID, objectID, m_HostCapsObj.AgentID)) + { + return LLSDHelpers.SerialiseLLSDReply(response); + } + } + } + + InventoryItemBase item = null; + InventoryItemBase copyItem = null; + IClientAPI client = null; + + m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); + item = m_Scene.InventoryService.GetItem(new InventoryItemBase(itemID)); + if (item != null) + { + copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID); + if (copyItem != null && client != null) + { + m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder); + client.SendBulkUpdateInventory(copyItem); + } + } + else + { + m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID); + if (client != null) + client.SendAlertMessage("Failed to retrieve item"); + } + } + catch (Exception e) + { + m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard : {0}", e.ToString()); + } + + response["int_response_code"] = 200; + return LLSDHelpers.SerialiseLLSDReply(response); + } } public class AssetUploader diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 25a8da6af3..3935c92f41 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -524,7 +524,7 @@ Cap_AttachmentResources = "" Cap_AvatarPickerSearch = "" Cap_ChatSessionRequest = "" - Cap_CopyInventoryFromNotecard = "" + Cap_CopyInventoryFromNotecard = "localhost" Cap_DispatchRegionInfo = "" Cap_EstateChangeInfo = "" Cap_EventQueueGet = "localhost" From 5e60afe5ed6368ef94a15907a6c2042923f7b5f1 Mon Sep 17 00:00:00 2001 From: Garmin Kawaguichi Date: Sun, 29 Jan 2012 21:39:30 +0100 Subject: [PATCH 4/4] Fix llEdgeOfWorld functionality - see mantis http://opensimulator.org/mantis/view.php?id=5865 Signed-off-by: nebadon --- .../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 fb5fd45f60..50fe218285 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5506,7 +5506,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (GridRegion sri in neighbors) { - if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) + if (sri.RegionCoordX == neighborX && sri.RegionCoordY == neighborY) return 0; }