From 7c1f17b994ca987df2167101054f523cc33d7fb9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 16 Apr 2008 14:10:54 +0000 Subject: * Applying melanie's Landmark patch. Thanks Melanie! * To make a landmark, you currently have to enable admin options in the advanced menu first. We're working on this.. however use the admin options solution in the mean time. --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 97d09aa..ff0f3a7 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -545,7 +545,20 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo != null) { - AssetBase asset = CreateAsset(name, description, invType, assetType, null); + ScenePresence presence; + TryGetAvatar(remoteClient.AgentId, out presence); + byte[] data = null; + if(invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum + { + LLVector3 pos=presence.AbsolutePosition; + string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", + presence.Scene.RegionInfo.RegionID, + pos.X, pos.Y, pos.Z, + presence.RegionHandle); + data=Encoding.ASCII.GetBytes(strdata); + } + + AssetBase asset = CreateAsset(name, description, invType, assetType, data); AssetCache.AddAsset(asset); CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); -- cgit v1.1