* 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.
This commit is contained in:
Teravus Ovares
2008-04-16 14:10:54 +00:00
parent 1eb0fedd93
commit 7c1f17b994
8 changed files with 62 additions and 34 deletions

View File

@@ -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);