diff options
author | Mike Mazur | 2009-02-04 00:01:36 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-04 00:01:36 +0000 |
commit | 0c03a48fb2060eda4d288e2d2ca4e650ce000b4b (patch) | |
tree | a90465075960c92367b0a5e62db3121e4e3a139d /OpenSim/Region/Environment/Scenes | |
parent | * Add another object to the existing save oar test (diff) | |
download | opensim-SC_OLD-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.zip opensim-SC_OLD-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.gz opensim-SC_OLD-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.bz2 opensim-SC_OLD-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.xz |
- add OpenSim.Framework.AssetMetadata class. AssetBase is now composed of it
- trim trailing whitespace
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs | 68 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 184 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 120 |
3 files changed, 186 insertions, 186 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs index 3acaa21..73a5a3a 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -1,29 +1,29 @@ | |||
1 | /** | 1 | /** |
2 | * Copyright (c) 2008, Contributors. All rights reserved. | 2 | * Copyright (c) 2008, Contributors. All rights reserved. |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without modification, | 5 | * Redistribution and use in source and binary forms, with or without modification, |
6 | * are permitted provided that the following conditions are met: | 6 | * are permitted provided that the following conditions are met: |
7 | * | 7 | * |
8 | * * Redistributions of source code must retain the above copyright notice, | 8 | * * Redistributions of source code must retain the above copyright notice, |
9 | * this list of conditions and the following disclaimer. | 9 | * this list of conditions and the following disclaimer. |
10 | * * Redistributions in binary form must reproduce the above copyright notice, | 10 | * * Redistributions in binary form must reproduce the above copyright notice, |
11 | * this list of conditions and the following disclaimer in the documentation | 11 | * this list of conditions and the following disclaimer in the documentation |
12 | * and/or other materials provided with the distribution. | 12 | * and/or other materials provided with the distribution. |
13 | * * Neither the name of the Organizations nor the names of Individual | 13 | * * Neither the name of the Organizations nor the names of Individual |
14 | * Contributors may be used to endorse or promote products derived from | 14 | * Contributors may be used to endorse or promote products derived from |
15 | * this software without specific prior written permission. | 15 | * this software without specific prior written permission. |
16 | * | 16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
20 | * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 20 | * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
22 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | 22 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
24 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 24 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
25 | * OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -48,7 +48,7 @@ using OpenSim.Region.Environment.Scenes; | |||
48 | 48 | ||
49 | namespace OpenSim.Region.Environment.Scenes.Hypergrid | 49 | namespace OpenSim.Region.Environment.Scenes.Hypergrid |
50 | { | 50 | { |
51 | public class HGAssetMapper | 51 | public class HGAssetMapper |
52 | { | 52 | { |
53 | #region Fields | 53 | #region Fields |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -128,12 +128,12 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
128 | 128 | ||
129 | if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset) && (asset != null)) | 129 | if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset) && (asset != null)) |
130 | { | 130 | { |
131 | m_log.Debug("[HGScene]: Asset made it to asset cache. " + asset.Name + " " + assetID); | 131 | m_log.Debug("[HGScene]: Asset made it to asset cache. " + asset.Metadata.Name + " " + assetID); |
132 | // I think I need to store it in the asset DB too. | 132 | // I think I need to store it in the asset DB too. |
133 | // For now, let me just do it for textures and scripts | 133 | // For now, let me just do it for textures and scripts |
134 | if (((AssetType)asset.Type == AssetType.Texture) || | 134 | if (((AssetType)asset.Metadata.Type == AssetType.Texture) || |
135 | ((AssetType)asset.Type == AssetType.LSLBytecode) || | 135 | ((AssetType)asset.Metadata.Type == AssetType.LSLBytecode) || |
136 | ((AssetType)asset.Type == AssetType.LSLText)) | 136 | ((AssetType)asset.Metadata.Type == AssetType.LSLText)) |
137 | { | 137 | { |
138 | AssetBase asset1 = new AssetBase(); | 138 | AssetBase asset1 = new AssetBase(); |
139 | Copy(asset, asset1); | 139 | Copy(asset, asset1); |
@@ -157,9 +157,9 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
157 | if (asset1 != null) | 157 | if (asset1 != null) |
158 | { | 158 | { |
159 | // See long comment in AssetCache.AddAsset | 159 | // See long comment in AssetCache.AddAsset |
160 | if (!asset1.Temporary || asset1.Local) | 160 | if (!asset1.Metadata.Temporary || asset1.Metadata.Local) |
161 | { | 161 | { |
162 | // The asset cache returns instances of subclasses of AssetBase: | 162 | // The asset cache returns instances of subclasses of AssetBase: |
163 | // TextureImage or AssetInfo. So in passing them to the remote | 163 | // TextureImage or AssetInfo. So in passing them to the remote |
164 | // server we first need to convert this to instances of AssetBase, | 164 | // server we first need to convert this to instances of AssetBase, |
165 | // which is the serializable class for assets. | 165 | // which is the serializable class for assets. |
@@ -179,14 +179,14 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
179 | private void Copy(AssetBase from, AssetBase to) | 179 | private void Copy(AssetBase from, AssetBase to) |
180 | { | 180 | { |
181 | to.Data = from.Data; | 181 | to.Data = from.Data; |
182 | to.Description = from.Description; | 182 | to.Metadata.Description = from.Metadata.Description; |
183 | to.FullID = from.FullID; | 183 | to.Metadata.FullID = from.Metadata.FullID; |
184 | to.ID = from.ID; | 184 | to.Metadata.ID = from.Metadata.ID; |
185 | to.Local = from.Local; | 185 | to.Metadata.Local = from.Metadata.Local; |
186 | to.Name = from.Name; | 186 | to.Metadata.Name = from.Metadata.Name; |
187 | to.Temporary = from.Temporary; | 187 | to.Metadata.Temporary = from.Metadata.Temporary; |
188 | to.Type = from.Type; | 188 | to.Metadata.Type = from.Metadata.Type; |
189 | 189 | ||
190 | } | 190 | } |
191 | 191 | ||
192 | private void _guardedAdd(Dictionary<UUID, bool> lst, UUID obj, bool val) | 192 | private void _guardedAdd(Dictionary<UUID, bool> lst, UUID obj, bool val) |
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
243 | private Dictionary<UUID, bool> SniffUUIDs(AssetBase asset) | 243 | private Dictionary<UUID, bool> SniffUUIDs(AssetBase asset) |
244 | { | 244 | { |
245 | Dictionary<UUID, bool> uuids = new Dictionary<UUID, bool>(); | 245 | Dictionary<UUID, bool> uuids = new Dictionary<UUID, bool>(); |
246 | if ((asset != null) && ((AssetType)asset.Type == AssetType.Object)) | 246 | if ((asset != null) && ((AssetType)asset.Metadata.Type == AssetType.Object)) |
247 | { | 247 | { |
248 | string ass_str = Utils.BytesToString(asset.Data); | 248 | string ass_str = Utils.BytesToString(asset.Data); |
249 | SceneObjectGroup sog = new SceneObjectGroup(ass_str, true); | 249 | SceneObjectGroup sog = new SceneObjectGroup(ass_str, true); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 58ab058..cb9aee2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -42,12 +42,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | public partial class Scene | 42 | public partial class Scene |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Allows asynchronous derezzing of objects from the scene into a client's inventory. | 48 | /// Allows asynchronous derezzing of objects from the scene into a client's inventory. |
49 | /// </summary> | 49 | /// </summary> |
50 | protected AsyncSceneObjectGroupDeleter m_asyncSceneObjectDeleter; | 50 | protected AsyncSceneObjectGroupDeleter m_asyncSceneObjectDeleter; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Start all the scripts in the scene which should be started. | 53 | /// Start all the scripts in the scene which should be started. |
@@ -145,9 +145,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
145 | else | 145 | else |
146 | { | 146 | { |
147 | m_log.ErrorFormat( | 147 | m_log.ErrorFormat( |
148 | "[AGENT INVENTORY]: Could not resolve user {0} for adding an inventory item", | 148 | "[AGENT INVENTORY]: Could not resolve user {0} for adding an inventory item", |
149 | remoteClient.AgentId); | 149 | remoteClient.AgentId); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | /// <summary> | 153 | /// <summary> |
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
175 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false); | 175 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false); |
176 | return UUID.Zero; | 176 | return UUID.Zero; |
177 | } | 177 | } |
178 | 178 | ||
179 | remoteClient.SendAgentAlertMessage("Notecard saved", false); | 179 | remoteClient.SendAgentAlertMessage("Notecard saved", false); |
180 | } | 180 | } |
181 | else if ((InventoryType)item.InvType == InventoryType.LSL) | 181 | else if ((InventoryType)item.InvType == InventoryType.LSL) |
@@ -185,7 +185,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
185 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); | 185 | remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false); |
186 | return UUID.Zero; | 186 | return UUID.Zero; |
187 | } | 187 | } |
188 | 188 | ||
189 | remoteClient.SendAgentAlertMessage("Script saved", false); | 189 | remoteClient.SendAgentAlertMessage("Script saved", false); |
190 | } | 190 | } |
191 | 191 | ||
@@ -193,21 +193,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); | 193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); |
194 | AssetCache.AddAsset(asset); | 194 | AssetCache.AddAsset(asset); |
195 | 195 | ||
196 | item.AssetID = asset.FullID; | 196 | item.AssetID = asset.Metadata.FullID; |
197 | userInfo.UpdateItem(item); | 197 | userInfo.UpdateItem(item); |
198 | 198 | ||
199 | // remoteClient.SendInventoryItemCreateUpdate(item); | 199 | // remoteClient.SendInventoryItemCreateUpdate(item); |
200 | return (asset.FullID); | 200 | return (asset.Metadata.FullID); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | } | 203 | } |
204 | else | 204 | else |
205 | { | 205 | { |
206 | m_log.ErrorFormat( | 206 | m_log.ErrorFormat( |
207 | "[AGENT INVENTORY]: Could not resolve user {0} for caps inventory update", | 207 | "[AGENT INVENTORY]: Could not resolve user {0} for caps inventory update", |
208 | remoteClient.AgentId); | 208 | remoteClient.AgentId); |
209 | } | 209 | } |
210 | 210 | ||
211 | return UUID.Zero; | 211 | return UUID.Zero; |
212 | } | 212 | } |
213 | 213 | ||
@@ -283,9 +283,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | { | 283 | { |
284 | part.Inventory.RemoveScriptInstance(item.ItemID); | 284 | part.Inventory.RemoveScriptInstance(item.ItemID); |
285 | } | 285 | } |
286 | 286 | ||
287 | // Update item with new asset | 287 | // Update item with new asset |
288 | item.AssetID = asset.FullID; | 288 | item.AssetID = asset.Metadata.FullID; |
289 | group.UpdateInventoryItem(item); | 289 | group.UpdateInventoryItem(item); |
290 | part.GetProperties(remoteClient); | 290 | part.GetProperties(remoteClient); |
291 | 291 | ||
@@ -406,7 +406,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
406 | /// </summary> | 406 | /// </summary> |
407 | /// <param name="recipientClient"></param> | 407 | /// <param name="recipientClient"></param> |
408 | /// <param name="senderId">ID of the sender of the item</param> | 408 | /// <param name="senderId">ID of the sender of the item</param> |
409 | /// <param name="itemId"></param> | 409 | /// <param name="itemId"></param> |
410 | public virtual void GiveInventoryItem(IClientAPI recipientClient, UUID senderId, UUID itemId) | 410 | public virtual void GiveInventoryItem(IClientAPI recipientClient, UUID senderId, UUID itemId) |
411 | { | 411 | { |
412 | InventoryItemBase itemCopy = GiveInventoryItem(recipientClient.AgentId, senderId, itemId); | 412 | InventoryItemBase itemCopy = GiveInventoryItem(recipientClient.AgentId, senderId, itemId); |
@@ -420,19 +420,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
420 | /// </summary> | 420 | /// </summary> |
421 | /// <param name="recipient"></param> | 421 | /// <param name="recipient"></param> |
422 | /// <param name="senderId">ID of the sender of the item</param> | 422 | /// <param name="senderId">ID of the sender of the item</param> |
423 | /// <param name="itemId"></param> | 423 | /// <param name="itemId"></param> |
424 | /// <returns>The inventory item copy given, null if the give was unsuccessful</returns> | 424 | /// <returns>The inventory item copy given, null if the give was unsuccessful</returns> |
425 | public virtual InventoryItemBase GiveInventoryItem(UUID recipient, UUID senderId, UUID itemId) | 425 | public virtual InventoryItemBase GiveInventoryItem(UUID recipient, UUID senderId, UUID itemId) |
426 | { | 426 | { |
427 | return GiveInventoryItem(recipient, senderId, itemId, UUID.Zero); | 427 | return GiveInventoryItem(recipient, senderId, itemId, UUID.Zero); |
428 | } | 428 | } |
429 | 429 | ||
430 | /// <summary> | 430 | /// <summary> |
431 | /// Give an inventory item from one user to another | 431 | /// Give an inventory item from one user to another |
432 | /// </summary> | 432 | /// </summary> |
433 | /// <param name="recipient"></param> | 433 | /// <param name="recipient"></param> |
434 | /// <param name="senderId">ID of the sender of the item</param> | 434 | /// <param name="senderId">ID of the sender of the item</param> |
435 | /// <param name="itemId"></param> | 435 | /// <param name="itemId"></param> |
436 | /// <param name="recipientFolderId"> | 436 | /// <param name="recipientFolderId"> |
437 | /// The id of the folder in which the copy item should go. If UUID.Zero then the item is placed in the most | 437 | /// The id of the folder in which the copy item should go. If UUID.Zero then the item is placed in the most |
438 | /// appropriate default folder. | 438 | /// appropriate default folder. |
@@ -485,7 +485,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
485 | itemCopy.AssetType = item.AssetType; | 485 | itemCopy.AssetType = item.AssetType; |
486 | itemCopy.InvType = item.InvType; | 486 | itemCopy.InvType = item.InvType; |
487 | itemCopy.Folder = recipientFolderId; | 487 | itemCopy.Folder = recipientFolderId; |
488 | 488 | ||
489 | if (Permissions.PropagatePermissions()) | 489 | if (Permissions.PropagatePermissions()) |
490 | { | 490 | { |
491 | if (item.InvType == 6) | 491 | if (item.InvType == 6) |
@@ -557,19 +557,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
557 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder"); | 557 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder"); |
558 | return null; | 558 | return null; |
559 | } | 559 | } |
560 | 560 | ||
561 | return null; | 561 | return null; |
562 | } | 562 | } |
563 | 563 | ||
564 | /// <summary> | 564 | /// <summary> |
565 | /// Give an entire inventory folder from one user to another. The entire contents (including all descendent | 565 | /// Give an entire inventory folder from one user to another. The entire contents (including all descendent |
566 | /// folders) is given. | 566 | /// folders) is given. |
567 | /// </summary> | 567 | /// </summary> |
568 | /// <param name="recipientId"></param> | 568 | /// <param name="recipientId"></param> |
569 | /// <param name="senderId">ID of the sender of the item</param> | 569 | /// <param name="senderId">ID of the sender of the item</param> |
570 | /// <param name="folderId"></param> | 570 | /// <param name="folderId"></param> |
571 | /// <param name="recipientParentFolderId"> | 571 | /// <param name="recipientParentFolderId"> |
572 | /// The id of the receipient folder in which the send folder should be placed. If UUID.Zero then the | 572 | /// The id of the receipient folder in which the send folder should be placed. If UUID.Zero then the |
573 | /// recipient folder is the root folder | 573 | /// recipient folder is the root folder |
574 | /// </param> | 574 | /// </param> |
575 | /// <returns> | 575 | /// <returns> |
@@ -588,24 +588,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
588 | 588 | ||
589 | return null; | 589 | return null; |
590 | } | 590 | } |
591 | 591 | ||
592 | if (!senderUserInfo.HasReceivedInventory) | 592 | if (!senderUserInfo.HasReceivedInventory) |
593 | { | 593 | { |
594 | m_log.DebugFormat( | 594 | m_log.DebugFormat( |
595 | "[AGENT INVENTORY]: Could not give inventory folder - have not yet received inventory for {0}", | 595 | "[AGENT INVENTORY]: Could not give inventory folder - have not yet received inventory for {0}", |
596 | senderId); | 596 | senderId); |
597 | 597 | ||
598 | return null; | 598 | return null; |
599 | } | 599 | } |
600 | 600 | ||
601 | InventoryFolderImpl folder = senderUserInfo.RootFolder.FindFolder(folderId); | 601 | InventoryFolderImpl folder = senderUserInfo.RootFolder.FindFolder(folderId); |
602 | 602 | ||
603 | if (null == folder) | 603 | if (null == folder) |
604 | { | 604 | { |
605 | m_log.ErrorFormat( | 605 | m_log.ErrorFormat( |
606 | "[AGENT INVENTORY]: Could not find inventory folder {0} to give", folderId); | 606 | "[AGENT INVENTORY]: Could not find inventory folder {0} to give", folderId); |
607 | 607 | ||
608 | return null; | 608 | return null; |
609 | } | 609 | } |
610 | 610 | ||
611 | CachedUserInfo recipientUserInfo | 611 | CachedUserInfo recipientUserInfo |
@@ -618,30 +618,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
618 | 618 | ||
619 | return null; | 619 | return null; |
620 | } | 620 | } |
621 | 621 | ||
622 | if (recipientParentFolderId == UUID.Zero) | 622 | if (recipientParentFolderId == UUID.Zero) |
623 | recipientParentFolderId = recipientUserInfo.RootFolder.ID; | 623 | recipientParentFolderId = recipientUserInfo.RootFolder.ID; |
624 | 624 | ||
625 | UUID newFolderId = UUID.Random(); | 625 | UUID newFolderId = UUID.Random(); |
626 | recipientUserInfo.CreateFolder(folder.Name, newFolderId, (ushort)folder.Type, recipientParentFolderId); | 626 | recipientUserInfo.CreateFolder(folder.Name, newFolderId, (ushort)folder.Type, recipientParentFolderId); |
627 | 627 | ||
628 | // XXX: Messy - we should really get this back in the CreateFolder call | 628 | // XXX: Messy - we should really get this back in the CreateFolder call |
629 | InventoryFolderImpl copiedFolder = recipientUserInfo.RootFolder.FindFolder(newFolderId); | 629 | InventoryFolderImpl copiedFolder = recipientUserInfo.RootFolder.FindFolder(newFolderId); |
630 | 630 | ||
631 | // Give all the subfolders | 631 | // Give all the subfolders |
632 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); | 632 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); |
633 | foreach (InventoryFolderImpl childFolder in subFolders) | 633 | foreach (InventoryFolderImpl childFolder in subFolders) |
634 | { | 634 | { |
635 | GiveInventoryFolder(recipientId, senderId, childFolder.ID, copiedFolder.ID); | 635 | GiveInventoryFolder(recipientId, senderId, childFolder.ID, copiedFolder.ID); |
636 | } | 636 | } |
637 | 637 | ||
638 | // Give all the items | 638 | // Give all the items |
639 | List<InventoryItemBase> items = folder.RequestListOfItems(); | 639 | List<InventoryItemBase> items = folder.RequestListOfItems(); |
640 | foreach (InventoryItemBase item in items) | 640 | foreach (InventoryItemBase item in items) |
641 | { | 641 | { |
642 | GiveInventoryItem(recipientId, senderId, item.ID, copiedFolder.ID); | 642 | GiveInventoryItem(recipientId, senderId, item.ID, copiedFolder.ID); |
643 | } | 643 | } |
644 | 644 | ||
645 | return copiedFolder; | 645 | return copiedFolder; |
646 | } | 646 | } |
647 | 647 | ||
@@ -688,7 +688,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
688 | { | 688 | { |
689 | if (newName != String.Empty) | 689 | if (newName != String.Empty) |
690 | { | 690 | { |
691 | asset.Name = newName; | 691 | asset.Metadata.Name = newName; |
692 | } | 692 | } |
693 | else | 693 | else |
694 | { | 694 | { |
@@ -728,10 +728,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
728 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) | 728 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) |
729 | { | 729 | { |
730 | AssetBase asset = new AssetBase(); | 730 | AssetBase asset = new AssetBase(); |
731 | asset.Name = name; | 731 | asset.Metadata.Name = name; |
732 | asset.Description = description; | 732 | asset.Metadata.Description = description; |
733 | asset.Type = assetType; | 733 | asset.Metadata.Type = assetType; |
734 | asset.FullID = UUID.Random(); | 734 | asset.Metadata.FullID = UUID.Random(); |
735 | asset.Data = (data == null) ? new byte[1] : data; | 735 | asset.Data = (data == null) ? new byte[1] : data; |
736 | 736 | ||
737 | return asset; | 737 | return asset; |
@@ -831,11 +831,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
831 | item.Owner = remoteClient.AgentId; | 831 | item.Owner = remoteClient.AgentId; |
832 | item.Creator = remoteClient.AgentId; | 832 | item.Creator = remoteClient.AgentId; |
833 | item.ID = UUID.Random(); | 833 | item.ID = UUID.Random(); |
834 | item.AssetID = asset.FullID; | 834 | item.AssetID = asset.Metadata.FullID; |
835 | item.Description = asset.Description; | 835 | item.Description = asset.Metadata.Description; |
836 | item.Name = name; | 836 | item.Name = name; |
837 | item.Flags = flags; | 837 | item.Flags = flags; |
838 | item.AssetType = asset.Type; | 838 | item.AssetType = asset.Metadata.Type; |
839 | item.InvType = invType; | 839 | item.InvType = invType; |
840 | item.Folder = folderID; | 840 | item.Folder = folderID; |
841 | item.CurrentPermissions = currentMask; | 841 | item.CurrentPermissions = currentMask; |
@@ -879,7 +879,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
879 | 879 | ||
880 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) | 880 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) |
881 | return; | 881 | return; |
882 | 882 | ||
883 | if (transactionID == UUID.Zero) | 883 | if (transactionID == UUID.Zero) |
884 | { | 884 | { |
885 | CachedUserInfo userInfo | 885 | CachedUserInfo userInfo |
@@ -890,7 +890,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
890 | ScenePresence presence; | 890 | ScenePresence presence; |
891 | TryGetAvatar(remoteClient.AgentId, out presence); | 891 | TryGetAvatar(remoteClient.AgentId, out presence); |
892 | byte[] data = null; | 892 | byte[] data = null; |
893 | 893 | ||
894 | if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum | 894 | if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum |
895 | { | 895 | { |
896 | Vector3 pos = presence.AbsolutePosition; | 896 | Vector3 pos = presence.AbsolutePosition; |
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
905 | AssetBase asset = CreateAsset(name, description, assetType, data); | 905 | AssetBase asset = CreateAsset(name, description, assetType, data); |
906 | AssetCache.AddAsset(asset); | 906 | AssetCache.AddAsset(asset); |
907 | 907 | ||
908 | CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); | 908 | CreateNewInventoryItem(remoteClient, folderID, asset.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
909 | } | 909 | } |
910 | else | 910 | else |
911 | { | 911 | { |
@@ -1429,7 +1429,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1429 | } | 1429 | } |
1430 | } | 1430 | } |
1431 | else // Updating existing item with new perms etc | 1431 | else // Updating existing item with new perms etc |
1432 | { | 1432 | { |
1433 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 1433 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
1434 | if (agentTransactions != null) | 1434 | if (agentTransactions != null) |
1435 | { | 1435 | { |
@@ -1511,7 +1511,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1511 | } | 1511 | } |
1512 | } | 1512 | } |
1513 | else // script has been rezzed directly into a prim's inventory | 1513 | else // script has been rezzed directly into a prim's inventory |
1514 | { | 1514 | { |
1515 | SceneObjectPart part = GetSceneObjectPart(itemBase.Folder); | 1515 | SceneObjectPart part = GetSceneObjectPart(itemBase.Folder); |
1516 | if (part == null) | 1516 | if (part == null) |
1517 | return; | 1517 | return; |
@@ -1521,10 +1521,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1521 | 1521 | ||
1522 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1522 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1523 | return; | 1523 | return; |
1524 | 1524 | ||
1525 | if (!Permissions.CanCreateObjectInventory( | 1525 | if (!Permissions.CanCreateObjectInventory( |
1526 | itemBase.InvType, part.UUID, remoteClient.AgentId)) | 1526 | itemBase.InvType, part.UUID, remoteClient.AgentId)) |
1527 | return; | 1527 | return; |
1528 | 1528 | ||
1529 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); | 1529 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); |
1530 | AssetCache.AddAsset(asset); | 1530 | AssetCache.AddAsset(asset); |
@@ -1550,7 +1550,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1550 | taskItem.Flags = itemBase.Flags; | 1550 | taskItem.Flags = itemBase.Flags; |
1551 | taskItem.PermsGranter = UUID.Zero; | 1551 | taskItem.PermsGranter = UUID.Zero; |
1552 | taskItem.PermsMask = 0; | 1552 | taskItem.PermsMask = 0; |
1553 | taskItem.AssetID = asset.FullID; | 1553 | taskItem.AssetID = asset.Metadata.FullID; |
1554 | 1554 | ||
1555 | part.Inventory.AddInventoryItem(taskItem, false); | 1555 | part.Inventory.AddInventoryItem(taskItem, false); |
1556 | part.GetProperties(remoteClient); | 1556 | part.GetProperties(remoteClient); |
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1737 | grp.UUID, | 1737 | grp.UUID, |
1738 | remoteClient.AgentId); | 1738 | remoteClient.AgentId); |
1739 | permissionToDelete = permissionToTake; | 1739 | permissionToDelete = permissionToTake; |
1740 | 1740 | ||
1741 | if (permissionToDelete) | 1741 | if (permissionToDelete) |
1742 | { | 1742 | { |
1743 | AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); | 1743 | AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); |
@@ -1794,8 +1794,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1794 | /// </summary> | 1794 | /// </summary> |
1795 | /// <param name="action"></param> | 1795 | /// <param name="action"></param> |
1796 | /// <param name="folderID"></param> | 1796 | /// <param name="folderID"></param> |
1797 | /// <param name="objectGroup"></param> | 1797 | /// <param name="objectGroup"></param> |
1798 | /// <param name="remoteClient"> </param> | 1798 | /// <param name="remoteClient"> </param> |
1799 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, | 1799 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, |
1800 | SceneObjectGroup objectGroup, IClientAPI remoteClient) | 1800 | SceneObjectGroup objectGroup, IClientAPI remoteClient) |
1801 | { | 1801 | { |
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1807 | // | 1807 | // |
1808 | CachedUserInfo userInfo; | 1808 | CachedUserInfo userInfo; |
1809 | 1809 | ||
1810 | if (action == DeRezAction.Take || action == DeRezAction.TakeCopy || | 1810 | if (action == DeRezAction.Take || action == DeRezAction.TakeCopy || |
1811 | action == DeRezAction.SaveToExistingUserInventoryItem) | 1811 | action == DeRezAction.SaveToExistingUserInventoryItem) |
1812 | { | 1812 | { |
1813 | // Take or take copy require a taker | 1813 | // Take or take copy require a taker |
@@ -1850,25 +1850,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1850 | // | 1850 | // |
1851 | 1851 | ||
1852 | InventoryFolderBase folder = null; | 1852 | InventoryFolderBase folder = null; |
1853 | InventoryItemBase item = null; | 1853 | InventoryItemBase item = null; |
1854 | 1854 | ||
1855 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 1855 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
1856 | { | 1856 | { |
1857 | item = userInfo.RootFolder.FindItem( | 1857 | item = userInfo.RootFolder.FindItem( |
1858 | objectGroup.RootPart.FromUserInventoryItemID); | 1858 | objectGroup.RootPart.FromUserInventoryItemID); |
1859 | 1859 | ||
1860 | if (null == item) | 1860 | if (null == item) |
1861 | { | 1861 | { |
1862 | m_log.DebugFormat( | 1862 | m_log.DebugFormat( |
1863 | "[AGENT INVENTORY]: Object {0} {1} scheduled for save to inventory has already been deleted.", | 1863 | "[AGENT INVENTORY]: Object {0} {1} scheduled for save to inventory has already been deleted.", |
1864 | objectGroup.Name, objectGroup.UUID); | 1864 | objectGroup.Name, objectGroup.UUID); |
1865 | return UUID.Zero; | 1865 | return UUID.Zero; |
1866 | } | 1866 | } |
1867 | } | 1867 | } |
1868 | else | 1868 | else |
1869 | { | 1869 | { |
1870 | // Folder magic | 1870 | // Folder magic |
1871 | // | 1871 | // |
1872 | if (action == DeRezAction.Delete) | 1872 | if (action == DeRezAction.Delete) |
1873 | { | 1873 | { |
1874 | // Deleting someone else's item | 1874 | // Deleting someone else's item |
@@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1940 | item.InvType = (int)InventoryType.Object; | 1940 | item.InvType = (int)InventoryType.Object; |
1941 | item.Folder = folder.ID; | 1941 | item.Folder = folder.ID; |
1942 | item.Owner = userInfo.UserProfile.ID; | 1942 | item.Owner = userInfo.UserProfile.ID; |
1943 | 1943 | ||
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | AssetBase asset = CreateAsset( | 1946 | AssetBase asset = CreateAsset( |
@@ -1949,16 +1949,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1949 | (sbyte)AssetType.Object, | 1949 | (sbyte)AssetType.Object, |
1950 | Utils.StringToBytes(sceneObjectXml)); | 1950 | Utils.StringToBytes(sceneObjectXml)); |
1951 | AssetCache.AddAsset(asset); | 1951 | AssetCache.AddAsset(asset); |
1952 | assetID = asset.FullID; | 1952 | assetID = asset.Metadata.FullID; |
1953 | 1953 | ||
1954 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 1954 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
1955 | { | 1955 | { |
1956 | item.AssetID = asset.FullID; | 1956 | item.AssetID = asset.Metadata.FullID; |
1957 | userInfo.UpdateItem(item); | 1957 | userInfo.UpdateItem(item); |
1958 | } | 1958 | } |
1959 | else | 1959 | else |
1960 | { | 1960 | { |
1961 | item.AssetID = asset.FullID; | 1961 | item.AssetID = asset.Metadata.FullID; |
1962 | 1962 | ||
1963 | if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions()) | 1963 | if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions()) |
1964 | { | 1964 | { |
@@ -1991,12 +1991,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1991 | 1991 | ||
1992 | // TODO: add the new fields (Flags, Sale info, etc) | 1992 | // TODO: add the new fields (Flags, Sale info, etc) |
1993 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 1993 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
1994 | item.Description = asset.Description; | 1994 | item.Description = asset.Metadata.Description; |
1995 | item.Name = asset.Name; | 1995 | item.Name = asset.Metadata.Name; |
1996 | item.AssetType = asset.Type; | 1996 | item.AssetType = asset.Metadata.Type; |
1997 | 1997 | ||
1998 | userInfo.AddItem(item); | 1998 | userInfo.AddItem(item); |
1999 | 1999 | ||
2000 | if (remoteClient != null && item.Owner == remoteClient.AgentId) | 2000 | if (remoteClient != null && item.Owner == remoteClient.AgentId) |
2001 | { | 2001 | { |
2002 | remoteClient.SendInventoryItemCreateUpdate(item); | 2002 | remoteClient.SendInventoryItemCreateUpdate(item); |
@@ -2008,10 +2008,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2008 | { | 2008 | { |
2009 | notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item); | 2009 | notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item); |
2010 | } | 2010 | } |
2011 | } | 2011 | } |
2012 | } | 2012 | } |
2013 | } | 2013 | } |
2014 | 2014 | ||
2015 | return assetID; | 2015 | return assetID; |
2016 | } | 2016 | } |
2017 | 2017 | ||
@@ -2025,11 +2025,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2025 | m_log.InfoFormat("[ATTACHMENT]: Save request for {0} which is unchanged", grp.UUID); | 2025 | m_log.InfoFormat("[ATTACHMENT]: Save request for {0} which is unchanged", grp.UUID); |
2026 | return; | 2026 | return; |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | m_log.InfoFormat( | 2029 | m_log.InfoFormat( |
2030 | "[ATTACHMENT]: Updating asset for attachment {0}, attachpoint {1}", | 2030 | "[ATTACHMENT]: Updating asset for attachment {0}, attachpoint {1}", |
2031 | grp.UUID, grp.GetAttachmentPoint()); | 2031 | grp.UUID, grp.GetAttachmentPoint()); |
2032 | 2032 | ||
2033 | string sceneObjectXml = objectGroup.ToXmlString(); | 2033 | string sceneObjectXml = objectGroup.ToXmlString(); |
2034 | 2034 | ||
2035 | CachedUserInfo userInfo = | 2035 | CachedUserInfo userInfo = |
@@ -2077,10 +2077,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2077 | Utils.StringToBytes(sceneObjectXml)); | 2077 | Utils.StringToBytes(sceneObjectXml)); |
2078 | AssetCache.AddAsset(asset); | 2078 | AssetCache.AddAsset(asset); |
2079 | 2079 | ||
2080 | item.AssetID = asset.FullID; | 2080 | item.AssetID = asset.Metadata.FullID; |
2081 | item.Description = asset.Description; | 2081 | item.Description = asset.Metadata.Description; |
2082 | item.Name = asset.Name; | 2082 | item.Name = asset.Metadata.Name; |
2083 | item.AssetType = asset.Type; | 2083 | item.AssetType = asset.Metadata.Type; |
2084 | item.InvType = (int)InventoryType.Object; | 2084 | item.InvType = (int)InventoryType.Object; |
2085 | item.Folder = foundFolder; | 2085 | item.Folder = foundFolder; |
2086 | 2086 | ||
@@ -2118,10 +2118,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2118 | item.Creator = grp.RootPart.CreatorID; | 2118 | item.Creator = grp.RootPart.CreatorID; |
2119 | item.Owner = remoteClient.AgentId; | 2119 | item.Owner = remoteClient.AgentId; |
2120 | item.ID = UUID.Random(); | 2120 | item.ID = UUID.Random(); |
2121 | item.AssetID = asset.FullID; | 2121 | item.AssetID = asset.Metadata.FullID; |
2122 | item.Description = asset.Description; | 2122 | item.Description = asset.Metadata.Description; |
2123 | item.Name = asset.Name; | 2123 | item.Name = asset.Metadata.Name; |
2124 | item.AssetType = asset.Type; | 2124 | item.AssetType = asset.Metadata.Type; |
2125 | item.InvType = (int)InventoryType.Object; | 2125 | item.InvType = (int)InventoryType.Object; |
2126 | 2126 | ||
2127 | item.Folder = UUID.Zero; // Objects folder! | 2127 | item.Folder = UUID.Zero; // Objects folder! |
@@ -2241,20 +2241,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
2241 | if (rezAsset != null) | 2241 | if (rezAsset != null) |
2242 | { | 2242 | { |
2243 | UUID itemId = UUID.Zero; | 2243 | UUID itemId = UUID.Zero; |
2244 | 2244 | ||
2245 | // If we have permission to copy then link the rezzed object back to the user inventory | 2245 | // If we have permission to copy then link the rezzed object back to the user inventory |
2246 | // item that it came from. This allows us to enable 'save object to inventory' | 2246 | // item that it came from. This allows us to enable 'save object to inventory' |
2247 | if (!Permissions.BypassPermissions()) | 2247 | if (!Permissions.BypassPermissions()) |
2248 | { | 2248 | { |
2249 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy) | 2249 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy) |
2250 | { | 2250 | { |
2251 | itemId = item.ID; | 2251 | itemId = item.ID; |
2252 | } | 2252 | } |
2253 | } | 2253 | } |
2254 | 2254 | ||
2255 | string xmlData = Utils.BytesToString(rezAsset.Data); | 2255 | string xmlData = Utils.BytesToString(rezAsset.Data); |
2256 | SceneObjectGroup group = new SceneObjectGroup(itemId, xmlData, true); | 2256 | SceneObjectGroup group = new SceneObjectGroup(itemId, xmlData, true); |
2257 | 2257 | ||
2258 | if (!Permissions.CanRezObject( | 2258 | if (!Permissions.CanRezObject( |
2259 | group.Children.Count, remoteClient.AgentId, pos) | 2259 | group.Children.Count, remoteClient.AgentId, pos) |
2260 | && !attachment) | 2260 | && !attachment) |
@@ -2351,12 +2351,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2351 | group.ClearPartAttachmentData(); | 2351 | group.ClearPartAttachmentData(); |
2352 | } | 2352 | } |
2353 | } | 2353 | } |
2354 | 2354 | ||
2355 | if (!attachment) | 2355 | if (!attachment) |
2356 | { | 2356 | { |
2357 | // Fire on_rez | 2357 | // Fire on_rez |
2358 | group.CreateScriptInstances(0, true, DefaultScriptEngine, 0); | 2358 | group.CreateScriptInstances(0, true, DefaultScriptEngine, 0); |
2359 | 2359 | ||
2360 | rootPart.ScheduleFullUpdate(); | 2360 | rootPart.ScheduleFullUpdate(); |
2361 | } | 2361 | } |
2362 | 2362 | ||
@@ -2500,7 +2500,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2500 | DeRezObject(null, grp.RootPart.LocalId, | 2500 | DeRezObject(null, grp.RootPart.LocalId, |
2501 | grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); | 2501 | grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); |
2502 | } | 2502 | } |
2503 | 2503 | ||
2504 | return true; | 2504 | return true; |
2505 | } | 2505 | } |
2506 | 2506 | ||
@@ -2632,7 +2632,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2632 | } | 2632 | } |
2633 | 2633 | ||
2634 | } | 2634 | } |
2635 | 2635 | ||
2636 | m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient); | 2636 | m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient); |
2637 | } | 2637 | } |
2638 | 2638 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 33dae66..32bd9aa 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -115,18 +115,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
115 | 115 | ||
116 | /// <value> | 116 | /// <value> |
117 | /// All the region modules attached to this scene. | 117 | /// All the region modules attached to this scene. |
118 | /// </value> | 118 | /// </value> |
119 | public Dictionary<string, IRegionModule> Modules | 119 | public Dictionary<string, IRegionModule> Modules |
120 | { | 120 | { |
121 | get { return m_modules; } | 121 | get { return m_modules; } |
122 | } | 122 | } |
123 | protected Dictionary<string, IRegionModule> m_modules = new Dictionary<string, IRegionModule>(); | 123 | protected Dictionary<string, IRegionModule> m_modules = new Dictionary<string, IRegionModule>(); |
124 | 124 | ||
125 | /// <value> | 125 | /// <value> |
126 | /// The module interfaces available from this scene. | 126 | /// The module interfaces available from this scene. |
127 | /// </value> | 127 | /// </value> |
128 | protected Dictionary<Type, List<object> > ModuleInterfaces = new Dictionary<Type, List<object> >(); | 128 | protected Dictionary<Type, List<object> > ModuleInterfaces = new Dictionary<Type, List<object> >(); |
129 | 129 | ||
130 | protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>(); | 130 | protected Dictionary<string, object> ModuleAPIMethods = new Dictionary<string, object>(); |
131 | protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); | 131 | protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); |
132 | 132 | ||
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
143 | protected IInterregionCommsIn m_interregionCommsIn; | 143 | protected IInterregionCommsIn m_interregionCommsIn; |
144 | protected IDialogModule m_dialogModule; | 144 | protected IDialogModule m_dialogModule; |
145 | protected internal ICapabilitiesModule CapsModule; | 145 | protected internal ICapabilitiesModule CapsModule; |
146 | 146 | ||
147 | // Central Update Loop | 147 | // Central Update Loop |
148 | 148 | ||
149 | protected int m_fps = 10; | 149 | protected int m_fps = 10; |
@@ -280,10 +280,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
280 | } | 280 | } |
281 | 281 | ||
282 | public int objectCapacity = 45000; | 282 | public int objectCapacity = 45000; |
283 | 283 | ||
284 | /// <value> | 284 | /// <value> |
285 | /// Registered classes that are capable of creating entities. | 285 | /// Registered classes that are capable of creating entities. |
286 | /// </value> | 286 | /// </value> |
287 | protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>(); | 287 | protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>(); |
288 | 288 | ||
289 | #endregion | 289 | #endregion |
@@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | 316 | ||
317 | m_eventManager = new EventManager(); | 317 | m_eventManager = new EventManager(); |
318 | m_permissions = new ScenePermissions(this); | 318 | m_permissions = new ScenePermissions(this); |
319 | 319 | ||
320 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); | 320 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); |
321 | m_asyncSceneObjectDeleter.Enabled = true; | 321 | m_asyncSceneObjectDeleter.Enabled = true; |
322 | 322 | ||
@@ -421,7 +421,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
421 | protected virtual void RegisterDefaultSceneEvents() | 421 | protected virtual void RegisterDefaultSceneEvents() |
422 | { | 422 | { |
423 | IDialogModule dm = RequestModuleInterface<IDialogModule>(); | 423 | IDialogModule dm = RequestModuleInterface<IDialogModule>(); |
424 | 424 | ||
425 | if (dm != null) | 425 | if (dm != null) |
426 | m_eventManager.OnPermissionError += dm.SendAlertToUser; | 426 | m_eventManager.OnPermissionError += dm.SendAlertToUser; |
427 | } | 427 | } |
@@ -564,7 +564,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
564 | m_incrementsof15seconds = (int)seconds / 15; | 564 | m_incrementsof15seconds = (int)seconds / 15; |
565 | m_RestartTimerCounter = 0; | 565 | m_RestartTimerCounter = 0; |
566 | m_restartTimer.AutoReset = true; | 566 | m_restartTimer.AutoReset = true; |
567 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 567 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
568 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); | 568 | m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); |
569 | m_restartTimer.Start(); | 569 | m_restartTimer.Start(); |
570 | m_dialogModule.SendNotificationToUsersInRegion( | 570 | m_dialogModule.SendNotificationToUsersInRegion( |
@@ -583,8 +583,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
583 | { | 583 | { |
584 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) | 584 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) |
585 | m_dialogModule.SendNotificationToUsersInRegion( | 585 | m_dialogModule.SendNotificationToUsersInRegion( |
586 | UUID.Random(), | 586 | UUID.Random(), |
587 | String.Empty, | 587 | String.Empty, |
588 | RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter) * 15) + " seconds"); | 588 | RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter) * 15) + " seconds"); |
589 | } | 589 | } |
590 | else | 590 | else |
@@ -717,7 +717,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
717 | 717 | ||
718 | // Stop all client threads. | 718 | // Stop all client threads. |
719 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(true); }); | 719 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(true); }); |
720 | 720 | ||
721 | // Stop updating the scene objects and agents. | 721 | // Stop updating the scene objects and agents. |
722 | //m_heartbeatTimer.Close(); | 722 | //m_heartbeatTimer.Close(); |
723 | shuttingdown = true; | 723 | shuttingdown = true; |
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
733 | } | 733 | } |
734 | 734 | ||
735 | m_sceneGraph.Close(); | 735 | m_sceneGraph.Close(); |
736 | 736 | ||
737 | // De-register with region communications (events cleanup) | 737 | // De-register with region communications (events cleanup) |
738 | UnRegisterRegionWithComms(); | 738 | UnRegisterRegionWithComms(); |
739 | 739 | ||
@@ -1400,7 +1400,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1400 | //tc = System.Environment.TickCount - tc; | 1400 | //tc = System.Environment.TickCount - tc; |
1401 | //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms"); | 1401 | //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms"); |
1402 | } | 1402 | } |
1403 | 1403 | ||
1404 | m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); | 1404 | m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); |
1405 | 1405 | ||
1406 | bool drawPrimVolume = true; | 1406 | bool drawPrimVolume = true; |
@@ -1644,13 +1644,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1644 | m_regInfo.RegionSettings.TerrainImageID = TerrainImageUUID; | 1644 | m_regInfo.RegionSettings.TerrainImageID = TerrainImageUUID; |
1645 | 1645 | ||
1646 | AssetBase asset = new AssetBase(); | 1646 | AssetBase asset = new AssetBase(); |
1647 | asset.FullID = m_regInfo.RegionSettings.TerrainImageID; | 1647 | asset.Metadata.FullID = m_regInfo.RegionSettings.TerrainImageID; |
1648 | asset.Data = data; | 1648 | asset.Data = data; |
1649 | asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); | 1649 | asset.Metadata.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); |
1650 | asset.Description = RegionInfo.RegionName; | 1650 | asset.Metadata.Description = RegionInfo.RegionName; |
1651 | 1651 | ||
1652 | asset.Type = 0; | 1652 | asset.Metadata.Type = 0; |
1653 | asset.Temporary = temporary; | 1653 | asset.Metadata.Temporary = temporary; |
1654 | AssetCache.AddAsset(asset); | 1654 | AssetCache.AddAsset(asset); |
1655 | } | 1655 | } |
1656 | 1656 | ||
@@ -1699,7 +1699,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1699 | m_log.ErrorFormat("[SCENE] Found a SceneObjectGroup with m_rootPart == null and {0} children", | 1699 | m_log.ErrorFormat("[SCENE] Found a SceneObjectGroup with m_rootPart == null and {0} children", |
1700 | group.Children == null ? 0 : group.Children.Count); | 1700 | group.Children == null ? 0 : group.Children.Count); |
1701 | } | 1701 | } |
1702 | 1702 | ||
1703 | AddRestoredSceneObject(group, true, true); | 1703 | AddRestoredSceneObject(group, true, true); |
1704 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1704 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
1705 | rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted; | 1705 | rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted; |
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1814 | { | 1814 | { |
1815 | //m_log.DebugFormat( | 1815 | //m_log.DebugFormat( |
1816 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); | 1816 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); |
1817 | 1817 | ||
1818 | // If an entity creator has been registered for this prim type then use that | 1818 | // If an entity creator has been registered for this prim type then use that |
1819 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) | 1819 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) |
1820 | return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); | 1820 | return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); |
@@ -2094,7 +2094,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2094 | /// <returns></returns> | 2094 | /// <returns></returns> |
2095 | public bool IncomingInterRegionPrimGroup(UUID primID, string objXMLData, int XMLMethod) | 2095 | public bool IncomingInterRegionPrimGroup(UUID primID, string objXMLData, int XMLMethod) |
2096 | { | 2096 | { |
2097 | 2097 | ||
2098 | if (XMLMethod == 0) | 2098 | if (XMLMethod == 0) |
2099 | { | 2099 | { |
2100 | m_log.DebugFormat("[INTERREGION]: A new prim {0} arrived from a neighbor", primID); | 2100 | m_log.DebugFormat("[INTERREGION]: A new prim {0} arrived from a neighbor", primID); |
@@ -2308,7 +2308,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2308 | 2308 | ||
2309 | CreateAndAddScenePresence(client); | 2309 | CreateAndAddScenePresence(client); |
2310 | } | 2310 | } |
2311 | 2311 | ||
2312 | m_LastLogin = System.Environment.TickCount; | 2312 | m_LastLogin = System.Environment.TickCount; |
2313 | EventManager.TriggerOnNewClient(client); | 2313 | EventManager.TriggerOnNewClient(client); |
2314 | } | 2314 | } |
@@ -2390,7 +2390,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2390 | client.OnUnackedTerrain += TerrainUnAcked; | 2390 | client.OnUnackedTerrain += TerrainUnAcked; |
2391 | 2391 | ||
2392 | client.OnObjectOwner += ObjectOwner; | 2392 | client.OnObjectOwner += ObjectOwner; |
2393 | 2393 | ||
2394 | if (StatsReporter != null) | 2394 | if (StatsReporter != null) |
2395 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsFromClientStats; | 2395 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsFromClientStats; |
2396 | 2396 | ||
@@ -2561,7 +2561,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2561 | m_log.ErrorFormat("[APPEARANCE]: Problem fetching appearance for avatar {0}, {1}", | 2561 | m_log.ErrorFormat("[APPEARANCE]: Problem fetching appearance for avatar {0}, {1}", |
2562 | client.Name, e); | 2562 | client.Name, e); |
2563 | } | 2563 | } |
2564 | 2564 | ||
2565 | m_log.Warn("[APPEARANCE]: Appearance not found, returning default"); | 2565 | m_log.Warn("[APPEARANCE]: Appearance not found, returning default"); |
2566 | } | 2566 | } |
2567 | 2567 | ||
@@ -2770,21 +2770,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
2770 | 2770 | ||
2771 | ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID); | 2771 | ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID); |
2772 | if (sp != null) | 2772 | if (sp != null) |
2773 | { | 2773 | { |
2774 | m_log.DebugFormat( | 2774 | m_log.DebugFormat( |
2775 | "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", | 2775 | "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", |
2776 | agent.AgentID, RegionInfo.RegionName); | 2776 | agent.AgentID, RegionInfo.RegionName); |
2777 | 2777 | ||
2778 | sp.AdjustKnownSeeds(); | 2778 | sp.AdjustKnownSeeds(); |
2779 | 2779 | ||
2780 | return; | 2780 | return; |
2781 | } | 2781 | } |
2782 | 2782 | ||
2783 | // Don't disable this log message - it's too helpful | 2783 | // Don't disable this log message - it's too helpful |
2784 | m_log.DebugFormat( | 2784 | m_log.DebugFormat( |
2785 | "[CONNECTION BEGIN]: Region {0} told of incoming client {1} {2} {3} (circuit code {4})", | 2785 | "[CONNECTION BEGIN]: Region {0} told of incoming client {1} {2} {3} (circuit code {4})", |
2786 | RegionInfo.RegionName, agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); | 2786 | RegionInfo.RegionName, agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); |
2787 | 2787 | ||
2788 | if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) | 2788 | if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) |
2789 | { | 2789 | { |
2790 | m_log.WarnFormat( | 2790 | m_log.WarnFormat( |
@@ -2808,10 +2808,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2808 | } | 2808 | } |
2809 | 2809 | ||
2810 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 2810 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |
2811 | 2811 | ||
2812 | // rewrite session_id | 2812 | // rewrite session_id |
2813 | CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID); | 2813 | CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID); |
2814 | 2814 | ||
2815 | if (userinfo != null) | 2815 | if (userinfo != null) |
2816 | { | 2816 | { |
2817 | userinfo.SessionID = agent.SessionID; | 2817 | userinfo.SessionID = agent.SessionID; |
@@ -2873,12 +2873,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2873 | public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) | 2873 | public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) |
2874 | { | 2874 | { |
2875 | ScenePresence presence; | 2875 | ScenePresence presence; |
2876 | 2876 | ||
2877 | lock (m_scenePresences) | 2877 | lock (m_scenePresences) |
2878 | { | 2878 | { |
2879 | m_scenePresences.TryGetValue(agentID, out presence); | 2879 | m_scenePresences.TryGetValue(agentID, out presence); |
2880 | } | 2880 | } |
2881 | 2881 | ||
2882 | if (presence != null) | 2882 | if (presence != null) |
2883 | { | 2883 | { |
2884 | try | 2884 | try |
@@ -2902,14 +2902,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2902 | { | 2902 | { |
2903 | // m_log.DebugFormat( | 2903 | // m_log.DebugFormat( |
2904 | // "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); | 2904 | // "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); |
2905 | 2905 | ||
2906 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); | 2906 | ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); |
2907 | if (childAgentUpdate != null) | 2907 | if (childAgentUpdate != null) |
2908 | { | 2908 | { |
2909 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 2909 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); |
2910 | return true; | 2910 | return true; |
2911 | } | 2911 | } |
2912 | 2912 | ||
2913 | return false; | 2913 | return false; |
2914 | } | 2914 | } |
2915 | 2915 | ||
@@ -2932,10 +2932,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2932 | // Not Implemented: | 2932 | // Not Implemented: |
2933 | //TODO: Do we need to pass the message on to one of our neighbors? | 2933 | //TODO: Do we need to pass the message on to one of our neighbors? |
2934 | } | 2934 | } |
2935 | 2935 | ||
2936 | return true; | 2936 | return true; |
2937 | } | 2937 | } |
2938 | 2938 | ||
2939 | return false; | 2939 | return false; |
2940 | } | 2940 | } |
2941 | 2941 | ||
@@ -2957,7 +2957,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2957 | public bool IncomingCloseAgent(UUID agentID) | 2957 | public bool IncomingCloseAgent(UUID agentID) |
2958 | { | 2958 | { |
2959 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); | 2959 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); |
2960 | 2960 | ||
2961 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 2961 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
2962 | if (presence != null) | 2962 | if (presence != null) |
2963 | { | 2963 | { |
@@ -2972,7 +2972,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2972 | } | 2972 | } |
2973 | 2973 | ||
2974 | // Don't do this to root agents on logout, it's not nice for the viewer | 2974 | // Don't do this to root agents on logout, it's not nice for the viewer |
2975 | if (presence.IsChildAgent) | 2975 | if (presence.IsChildAgent) |
2976 | { | 2976 | { |
2977 | // Tell a single agent to disconnect from the region. | 2977 | // Tell a single agent to disconnect from the region. |
2978 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | 2978 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); |
@@ -2984,11 +2984,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2984 | else | 2984 | else |
2985 | presence.ControllingClient.SendShutdownConnectionNotice(); | 2985 | presence.ControllingClient.SendShutdownConnectionNotice(); |
2986 | } | 2986 | } |
2987 | 2987 | ||
2988 | presence.ControllingClient.Close(true); | 2988 | presence.ControllingClient.Close(true); |
2989 | return true; | 2989 | return true; |
2990 | } | 2990 | } |
2991 | 2991 | ||
2992 | // Agent not here | 2992 | // Agent not here |
2993 | return false; | 2993 | return false; |
2994 | } | 2994 | } |
@@ -3059,7 +3059,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3059 | remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found."); | 3059 | remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found."); |
3060 | return; | 3060 | return; |
3061 | } | 3061 | } |
3062 | 3062 | ||
3063 | RequestTeleportLocation(remoteClient, regionInfo.RegionHandle, position, lookat, teleportFlags); | 3063 | RequestTeleportLocation(remoteClient, regionInfo.RegionHandle, position, lookat, teleportFlags); |
3064 | } | 3064 | } |
3065 | 3065 | ||
@@ -3080,7 +3080,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3080 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) | 3080 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) |
3081 | sp = m_scenePresences[remoteClient.AgentId]; | 3081 | sp = m_scenePresences[remoteClient.AgentId]; |
3082 | } | 3082 | } |
3083 | 3083 | ||
3084 | if (sp != null) | 3084 | if (sp != null) |
3085 | { | 3085 | { |
3086 | m_sceneGridService.RequestTeleportToLocation(sp, regionHandle, | 3086 | m_sceneGridService.RequestTeleportToLocation(sp, regionHandle, |
@@ -3211,7 +3211,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3211 | return; | 3211 | return; |
3212 | 3212 | ||
3213 | l.Add(mod); | 3213 | l.Add(mod); |
3214 | 3214 | ||
3215 | if (mod is IEntityCreator) | 3215 | if (mod is IEntityCreator) |
3216 | { | 3216 | { |
3217 | IEntityCreator entityCreator = (IEntityCreator)mod; | 3217 | IEntityCreator entityCreator = (IEntityCreator)mod; |
@@ -3220,7 +3220,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3220 | m_entityCreators[pcode] = entityCreator; | 3220 | m_entityCreators[pcode] = entityCreator; |
3221 | } | 3221 | } |
3222 | } | 3222 | } |
3223 | 3223 | ||
3224 | ModuleInterfaces[typeof(M)] = l; | 3224 | ModuleInterfaces[typeof(M)] = l; |
3225 | } | 3225 | } |
3226 | 3226 | ||
@@ -3243,7 +3243,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3243 | /// <summary> | 3243 | /// <summary> |
3244 | /// For the given interface, retrieve an array of region modules that implement it. | 3244 | /// For the given interface, retrieve an array of region modules that implement it. |
3245 | /// </summary> | 3245 | /// </summary> |
3246 | /// <returns>an empty array if there are no registered modules implementing that interface</returns> | 3246 | /// <returns>an empty array if there are no registered modules implementing that interface</returns> |
3247 | public override T[] RequestModuleInterfaces<T>() | 3247 | public override T[] RequestModuleInterfaces<T>() |
3248 | { | 3248 | { |
3249 | if (ModuleInterfaces.ContainsKey(typeof(T))) | 3249 | if (ModuleInterfaces.ContainsKey(typeof(T))) |
@@ -3383,7 +3383,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3383 | else | 3383 | else |
3384 | { | 3384 | { |
3385 | m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied"); | 3385 | m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
3386 | } | 3386 | } |
3387 | } | 3387 | } |
3388 | } | 3388 | } |
3389 | 3389 | ||
@@ -3855,14 +3855,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
3855 | public override bool PresenceChildStatus(UUID avatarID) | 3855 | public override bool PresenceChildStatus(UUID avatarID) |
3856 | { | 3856 | { |
3857 | ScenePresence cp = GetScenePresence(avatarID); | 3857 | ScenePresence cp = GetScenePresence(avatarID); |
3858 | 3858 | ||
3859 | // FIXME: This is really crap - some logout code is relying on a NullReferenceException to halt its processing | 3859 | // FIXME: This is really crap - some logout code is relying on a NullReferenceException to halt its processing |
3860 | // This needs to be fixed properly by cleaning up the logout code. | 3860 | // This needs to be fixed properly by cleaning up the logout code. |
3861 | //if (cp != null) | 3861 | //if (cp != null) |
3862 | // return cp.IsChildAgent; | 3862 | // return cp.IsChildAgent; |
3863 | 3863 | ||
3864 | //return false; | 3864 | //return false; |
3865 | 3865 | ||
3866 | return cp.IsChildAgent; | 3866 | return cp.IsChildAgent; |
3867 | } | 3867 | } |
3868 | 3868 | ||
@@ -4140,10 +4140,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
4140 | 4140 | ||
4141 | item.ID = UUID.Random(); | 4141 | item.ID = UUID.Random(); |
4142 | item.Owner = remoteClient.AgentId; | 4142 | item.Owner = remoteClient.AgentId; |
4143 | item.AssetID = asset.FullID; | 4143 | item.AssetID = asset.Metadata.FullID; |
4144 | item.Description = asset.Description; | 4144 | item.Description = asset.Metadata.Description; |
4145 | item.Name = asset.Name; | 4145 | item.Name = asset.Metadata.Name; |
4146 | item.AssetType = asset.Type; | 4146 | item.AssetType = asset.Metadata.Type; |
4147 | item.InvType = (int)InventoryType.Object; | 4147 | item.InvType = (int)InventoryType.Object; |
4148 | item.Folder = categoryID; | 4148 | item.Folder = categoryID; |
4149 | 4149 | ||
@@ -4194,7 +4194,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4194 | if (!okToSell) | 4194 | if (!okToSell) |
4195 | { | 4195 | { |
4196 | m_dialogModule.SendAlertToUser( | 4196 | m_dialogModule.SendAlertToUser( |
4197 | remoteClient, "This item's inventory doesn't appear to be for sale"); | 4197 | remoteClient, "This item's inventory doesn't appear to be for sale"); |
4198 | return false; | 4198 | return false; |
4199 | } | 4199 | } |
4200 | 4200 | ||
@@ -4252,7 +4252,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4252 | 4252 | ||
4253 | // This routine is normally called from within a lock (OdeLock) from within the OdePhysicsScene | 4253 | // This routine is normally called from within a lock (OdeLock) from within the OdePhysicsScene |
4254 | // WARNING: be careful of deadlocks here if you manipulate the scene. Remember you are being called | 4254 | // WARNING: be careful of deadlocks here if you manipulate the scene. Remember you are being called |
4255 | // from within the OdePhysicsScene. | 4255 | // from within the OdePhysicsScene. |
4256 | 4256 | ||
4257 | protected internal void jointMoved(PhysicsJoint joint) | 4257 | protected internal void jointMoved(PhysicsJoint joint) |
4258 | { | 4258 | { |
@@ -4348,7 +4348,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
4348 | // FIXME: this causes a sequential lookup of all objects in the scene; use a dictionary | 4348 | // FIXME: this causes a sequential lookup of all objects in the scene; use a dictionary |
4349 | if (joint != null) | 4349 | if (joint != null) |
4350 | { | 4350 | { |
4351 | if (joint.ErrorMessageCount > PhysicsJoint.maxErrorMessages) | 4351 | if (joint.ErrorMessageCount > PhysicsJoint.maxErrorMessages) |
4352 | return; | 4352 | return; |
4353 | 4353 | ||
4354 | SceneObjectPart jointProxyObject = GetSceneObjectPart(joint.ObjectNameInScene); | 4354 | SceneObjectPart jointProxyObject = GetSceneObjectPart(joint.ObjectNameInScene); |