diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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 | |||
545 | 545 | ||
546 | if (userInfo != null) | 546 | if (userInfo != null) |
547 | { | 547 | { |
548 | AssetBase asset = CreateAsset(name, description, invType, assetType, null); | 548 | ScenePresence presence; |
549 | TryGetAvatar(remoteClient.AgentId, out presence); | ||
550 | byte[] data = null; | ||
551 | if(invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum | ||
552 | { | ||
553 | LLVector3 pos=presence.AbsolutePosition; | ||
554 | string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", | ||
555 | presence.Scene.RegionInfo.RegionID, | ||
556 | pos.X, pos.Y, pos.Z, | ||
557 | presence.RegionHandle); | ||
558 | data=Encoding.ASCII.GetBytes(strdata); | ||
559 | } | ||
560 | |||
561 | AssetBase asset = CreateAsset(name, description, invType, assetType, data); | ||
549 | AssetCache.AddAsset(asset); | 562 | AssetCache.AddAsset(asset); |
550 | 563 | ||
551 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); | 564 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); |