From 995b893e4c7c89db8fc044e3f8524229490fb220 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 3 Jun 2011 09:04:34 -0700 Subject: [PATCH] HG Landmarks being created. WARNING: new config var under [HGInventoryAccessModule], Gatekeeper. --- .../InventoryAccess/HGInventoryAccessModule.cs | 15 +++++++++++++++ .../InventoryAccess/InventoryAccessModule.cs | 7 +++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 429dda7313..844054c808 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess private string m_ProfileServerURI; private bool m_OutboundPermission; + private string m_ThisGatekeeper; // private bool m_Initialized = false; @@ -85,6 +86,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); + m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty); } else m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); @@ -119,6 +121,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess #endregion #region Overrides of Basic Inventory Access methods + + protected override string GenerateLandmark(ScenePresence presence, out string suffix) + { + suffix = " @ " + m_ThisGatekeeper; + Vector3 pos = presence.AbsolutePosition; + return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\ngatekeeper {5}", + presence.Scene.RegionInfo.RegionID, + pos.X, pos.Y, pos.Z, + presence.RegionHandle, + m_ThisGatekeeper); + } + + /// /// CapsUpdateInventoryItemAsset /// diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 641a0425c6..d441aa46ba 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -196,8 +196,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (invType == (sbyte)InventoryType.Landmark && presence != null) { - string strdata = GenerateLandmark(presence); + string suffix = string.Empty; + string strdata = GenerateLandmark(presence, out suffix); data = Encoding.ASCII.GetBytes(strdata); + description += suffix; } AssetBase asset = m_Scene.CreateAsset(name, description, assetType, data, remoteClient.AgentId); @@ -224,8 +226,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } - protected virtual string GenerateLandmark(ScenePresence presence) + protected virtual string GenerateLandmark(ScenePresence presence, out string suffix) { + suffix = string.Empty; Vector3 pos = presence.AbsolutePosition; return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", presence.Scene.RegionInfo.RegionID,