diff options
author | Melanie | 2011-11-28 11:21:15 +0100 |
---|---|---|
committer | Melanie | 2011-11-28 11:21:15 +0100 |
commit | 80148bf7844690baf0f70226627bd42e6501f125 (patch) | |
tree | 7632978d49f16a84c1cf3b4d9cec6dcc715e0750 /OpenSim/Region/Framework | |
parent | Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge (diff) | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC-80148bf7844690baf0f70226627bd42e6501f125.zip opensim-SC-80148bf7844690baf0f70226627bd42e6501f125.tar.gz opensim-SC-80148bf7844690baf0f70226627bd42e6501f125.tar.bz2 opensim-SC-80148bf7844690baf0f70226627bd42e6501f125.tar.xz |
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to '')
4 files changed, 19 insertions, 83 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 575079f..59170df 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
330 | } | 330 | } |
331 | } | 331 | } |
332 | } | 332 | } |
333 | } | 333 | } |
334 | 334 | ||
335 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 335 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
336 | { | 336 | { |
@@ -487,6 +487,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
487 | // can be handled transparently). | 487 | // can be handled transparently). |
488 | InventoryFolderImpl fold = null; | 488 | InventoryFolderImpl fold = null; |
489 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) | 489 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) |
490 | { | ||
490 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) | 491 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) |
491 | { | 492 | { |
492 | remoteClient.SendInventoryFolderDetails( | 493 | remoteClient.SendInventoryFolderDetails( |
@@ -494,6 +495,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
494 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); | 495 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); |
495 | return; | 496 | return; |
496 | } | 497 | } |
498 | } | ||
497 | 499 | ||
498 | // We're going to send the reply async, because there may be | 500 | // We're going to send the reply async, because there may be |
499 | // an enormous quantity of packets -- basically the entire inventory! | 501 | // an enormous quantity of packets -- basically the entire inventory! |
@@ -514,64 +516,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
514 | SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; | 516 | SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; |
515 | d.EndInvoke(iar); | 517 | d.EndInvoke(iar); |
516 | } | 518 | } |
517 | |||
518 | /// <summary> | ||
519 | /// Handle the caps inventory descendents fetch. | ||
520 | /// | ||
521 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. | ||
522 | /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime?? | ||
523 | /// </summary> | ||
524 | /// <param name="agentID"></param> | ||
525 | /// <param name="folderID"></param> | ||
526 | /// <param name="ownerID"></param> | ||
527 | /// <param name="fetchFolders"></param> | ||
528 | /// <param name="fetchItems"></param> | ||
529 | /// <param name="sortOrder"></param> | ||
530 | /// <returns>null if the inventory look up failed</returns> | ||
531 | public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, | ||
532 | bool fetchFolders, bool fetchItems, int sortOrder, out int version) | ||
533 | { | ||
534 | m_log.DebugFormat( | ||
535 | "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", | ||
536 | fetchFolders, fetchItems, folderID, agentID); | ||
537 | |||
538 | // FIXME MAYBE: We're not handling sortOrder! | ||
539 | |||
540 | // TODO: This code for looking in the folder for the library should be folded back into the | ||
541 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. | ||
542 | // can be handled transparently). | ||
543 | InventoryFolderImpl fold; | ||
544 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) | ||
545 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) | ||
546 | { | ||
547 | version = 0; | ||
548 | InventoryCollection ret = new InventoryCollection(); | ||
549 | ret.Folders = new List<InventoryFolderBase>(); | ||
550 | ret.Items = fold.RequestListOfItems(); | ||
551 | |||
552 | return ret; | ||
553 | } | ||
554 | |||
555 | InventoryCollection contents = new InventoryCollection(); | ||
556 | |||
557 | if (folderID != UUID.Zero) | ||
558 | { | ||
559 | contents = InventoryService.GetFolderContent(agentID, folderID); | ||
560 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | ||
561 | containingFolder.ID = folderID; | ||
562 | containingFolder.Owner = agentID; | ||
563 | containingFolder = InventoryService.GetFolder(containingFolder); | ||
564 | version = containingFolder.Version; | ||
565 | } | ||
566 | else | ||
567 | { | ||
568 | // Lost itemsm don't really need a version | ||
569 | version = 1; | ||
570 | } | ||
571 | |||
572 | return contents; | ||
573 | |||
574 | } | ||
575 | 519 | ||
576 | /// <summary> | 520 | /// <summary> |
577 | /// Handle an inventory folder creation request from the client. | 521 | /// Handle an inventory folder creation request from the client. |
@@ -646,14 +590,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
646 | } | 590 | } |
647 | } | 591 | } |
648 | 592 | ||
593 | delegate void PurgeFolderDelegate(UUID userID, UUID folder); | ||
594 | |||
649 | /// <summary> | 595 | /// <summary> |
650 | /// This should delete all the items and folders in the given directory. | 596 | /// This should delete all the items and folders in the given directory. |
651 | /// </summary> | 597 | /// </summary> |
652 | /// <param name="remoteClient"></param> | 598 | /// <param name="remoteClient"></param> |
653 | /// <param name="folderID"></param> | 599 | /// <param name="folderID"></param> |
654 | |||
655 | delegate void PurgeFolderDelegate(UUID userID, UUID folder); | ||
656 | |||
657 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) | 600 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) |
658 | { | 601 | { |
659 | PurgeFolderDelegate d = PurgeFolderAsync; | 602 | PurgeFolderDelegate d = PurgeFolderAsync; |
@@ -667,7 +610,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
667 | } | 610 | } |
668 | } | 611 | } |
669 | 612 | ||
670 | |||
671 | private void PurgeFolderAsync(UUID userID, UUID folderID) | 613 | private void PurgeFolderAsync(UUID userID, UUID folderID) |
672 | { | 614 | { |
673 | InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); | 615 | InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 66341a1..2323335 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4838,9 +4838,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4838 | 4838 | ||
4839 | public Vector3? GetNearestAllowedPosition(ScenePresence avatar) | 4839 | public Vector3? GetNearestAllowedPosition(ScenePresence avatar) |
4840 | { | 4840 | { |
4841 | //simulate to make sure we have pretty up to date positions | ||
4842 | PhysicsScene.Simulate(0); | ||
4843 | |||
4844 | ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 4841 | ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
4845 | 4842 | ||
4846 | if (nearestParcel != null) | 4843 | if (nearestParcel != null) |
@@ -4867,12 +4864,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4867 | //Ultimate backup if we have no idea where they are | 4864 | //Ultimate backup if we have no idea where they are |
4868 | Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); | 4865 | Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); |
4869 | return avatar.lastKnownAllowedPosition; | 4866 | return avatar.lastKnownAllowedPosition; |
4870 | |||
4871 | } | 4867 | } |
4872 | 4868 | ||
4873 | //Go to the edge, this happens in teleporting to a region with no available parcels | 4869 | //Go to the edge, this happens in teleporting to a region with no available parcels |
4874 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); | 4870 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); |
4871 | |||
4875 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); | 4872 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); |
4873 | |||
4876 | return nearestRegionEdgePoint; | 4874 | return nearestRegionEdgePoint; |
4877 | } | 4875 | } |
4878 | 4876 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index eeb087f..82458e2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -448,29 +448,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
448 | } | 448 | } |
449 | 449 | ||
450 | /// <summary> | 450 | /// <summary> |
451 | /// Set the debug packet level on the current scene. This level governs which packets are printed out to the | 451 | /// Set the debug packet level on each current scene. This level governs which packets are printed out to the |
452 | /// console. | 452 | /// console. |
453 | /// </summary> | 453 | /// </summary> |
454 | /// <param name="newDebug"></param> | 454 | /// <param name="newDebug"></param> |
455 | /// <param name="name">Name of avatar to debug</param> | 455 | /// <param name="name">Name of avatar to debug</param> |
456 | public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) | 456 | public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) |
457 | { | 457 | { |
458 | ForEachCurrentScene( | 458 | ForEachCurrentScene(scene => |
459 | delegate(Scene scene) | 459 | scene.ForEachScenePresence(sp => |
460 | { | 460 | { |
461 | scene.ForEachRootClient(delegate(IClientAPI client) | 461 | if (name == null || sp.Name == name) |
462 | { | 462 | { |
463 | if (name == null || client.Name == name) | 463 | m_log.DebugFormat( |
464 | { | 464 | "Packet debug for {0} ({1}) set to {2}", |
465 | m_log.DebugFormat("Packet debug for {0} {1} set to {2}", | 465 | sp.Name, sp.IsChildAgent ? "child" : "root", newDebug); |
466 | client.FirstName, | ||
467 | client.LastName, | ||
468 | newDebug); | ||
469 | 466 | ||
470 | client.DebugPacketLevel = newDebug; | 467 | sp.ControllingClient.DebugPacketLevel = newDebug; |
471 | } | 468 | } |
472 | }); | 469 | }) |
473 | } | ||
474 | ); | 470 | ); |
475 | } | 471 | } |
476 | 472 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index c485e87..2335ad5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -1085,8 +1085,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1085 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); | 1085 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); |
1086 | else | 1086 | else |
1087 | invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); | 1087 | invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); |
1088 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); | 1088 | invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type)); |
1089 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); | 1089 | invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType)); |
1090 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); | 1090 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); |
1091 | 1091 | ||
1092 | invString.AddSaleStart(); | 1092 | invString.AddSaleStart(); |