HG Landmarks being created. WARNING: new config var under [HGInventoryAccessModule], Gatekeeper.
parent
76c60f1f99
commit
995b893e4c
|
@ -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
|
||||
///
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue