mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
* 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user