diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
12 files changed, 301 insertions, 196 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 09cc998..cdad729 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -687,187 +687,238 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
687 | m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); | 687 | m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); |
688 | } | 688 | } |
689 | 689 | ||
690 | /// <summary> | ||
691 | /// For a given set of appearance items, check whether the items are valid and add their asset IDs to | ||
692 | /// appearance data. | ||
693 | /// </summary> | ||
694 | /// <param name='userID'></param> | ||
695 | /// <param name='appearance'></param> | ||
690 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) | 696 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) |
691 | { | 697 | { |
692 | IInventoryService invService = m_scene.InventoryService; | 698 | IInventoryService invService = m_scene.InventoryService; |
693 | bool resetwearable = false; | 699 | |
694 | if (invService.GetRootFolder(userID) != null) | 700 | if (invService.GetRootFolder(userID) != null) |
695 | { | 701 | { |
696 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 702 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
697 | { | 703 | { |
698 | for (int j = 0; j < appearance.Wearables[i].Count; j++) | 704 | for (int j = 0; j < appearance.Wearables[i].Count; j++) |
699 | { | 705 | { |
700 | // Check if the default wearables are not set | ||
701 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) | 706 | if (appearance.Wearables[i][j].ItemID == UUID.Zero) |
702 | { | 707 | { |
703 | switch ((WearableType) i) | 708 | m_log.WarnFormat( |
704 | { | 709 | "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.", |
705 | case WearableType.Eyes: | 710 | i, j, userID); |
706 | case WearableType.Hair: | 711 | |
707 | case WearableType.Shape: | ||
708 | case WearableType.Skin: | ||
709 | //case WearableType.Underpants: | ||
710 | TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | ||
711 | resetwearable = true; | ||
712 | m_log.Warn("[AVFACTORY]: UUID.Zero Wearables, passing fake values."); | ||
713 | resetwearable = true; | ||
714 | break; | ||
715 | |||
716 | } | ||
717 | continue; | 712 | continue; |
718 | } | 713 | } |
719 | 714 | ||
720 | // Ignore ruth's assets except for the body parts! missing body parts fail avatar appearance on V1 | 715 | // Ignore ruth's assets |
721 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) | 716 | if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) |
722 | { | ||
723 | switch ((WearableType)i) | ||
724 | { | ||
725 | case WearableType.Eyes: | ||
726 | case WearableType.Hair: | ||
727 | case WearableType.Shape: | ||
728 | case WearableType.Skin: | ||
729 | //case WearableType.Underpants: | ||
730 | TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | ||
731 | |||
732 | m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i); | ||
733 | resetwearable = true; | ||
734 | break; | ||
735 | |||
736 | } | ||
737 | continue; | 717 | continue; |
738 | } | 718 | |
739 | |||
740 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); | 719 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); |
741 | baseItem = invService.GetItem(baseItem); | 720 | baseItem = invService.GetItem(baseItem); |
742 | 721 | ||
743 | if (baseItem != null) | 722 | if (baseItem != null) |
744 | { | 723 | { |
745 | appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); | 724 | appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); |
746 | int unmodifiedWearableIndexForClosure = i; | ||
747 | m_scene.AssetService.Get(baseItem.AssetID.ToString(), this, | ||
748 | delegate(string x, object y, AssetBase z) | ||
749 | { | ||
750 | if (z == null) | ||
751 | { | ||
752 | TryAndRepairBrokenWearable( | ||
753 | (WearableType)unmodifiedWearableIndexForClosure, invService, | ||
754 | userID, appearance); | ||
755 | } | ||
756 | }); | ||
757 | } | 725 | } |
758 | else | 726 | else |
759 | { | 727 | { |
760 | m_log.ErrorFormat( | 728 | m_log.WarnFormat( |
761 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", | 729 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", |
762 | appearance.Wearables[i][j].ItemID, (WearableType)i); | 730 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
763 | 731 | ||
764 | TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | 732 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
765 | resetwearable = true; | ||
766 | |||
767 | } | 733 | } |
768 | } | 734 | } |
769 | } | 735 | } |
770 | |||
771 | // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
772 | if (appearance.Wearables[(int) WearableType.Eyes] == null) | ||
773 | { | ||
774 | m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes)); | ||
775 | |||
776 | TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); | ||
777 | resetwearable = true; | ||
778 | } | ||
779 | else | ||
780 | { | ||
781 | if (appearance.Wearables[(int) WearableType.Eyes][0].ItemID == UUID.Zero) | ||
782 | { | ||
783 | m_log.WarnFormat("[AVFACTORY]: Eyes are UUID.Zero are broken, {0} {1}", | ||
784 | appearance.Wearables[(int) WearableType.Eyes][0].ItemID, | ||
785 | appearance.Wearables[(int) WearableType.Eyes][0].AssetID); | ||
786 | TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); | ||
787 | resetwearable = true; | ||
788 | |||
789 | } | ||
790 | |||
791 | } | ||
792 | // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
793 | if (appearance.Wearables[(int)WearableType.Shape] == null) | ||
794 | { | ||
795 | m_log.WarnFormat("[AVFACTORY]: {0} shape is Null, passing existing values.", (WearableType.Shape)); | ||
796 | |||
797 | TryAndRepairBrokenWearable(WearableType.Shape, invService, userID, appearance); | ||
798 | resetwearable = true; | ||
799 | } | ||
800 | else | ||
801 | { | ||
802 | if (appearance.Wearables[(int)WearableType.Shape][0].ItemID == UUID.Zero) | ||
803 | { | ||
804 | m_log.WarnFormat("[AVFACTORY]: Shape is UUID.Zero and broken, {0} {1}", | ||
805 | appearance.Wearables[(int)WearableType.Shape][0].ItemID, | ||
806 | appearance.Wearables[(int)WearableType.Shape][0].AssetID); | ||
807 | TryAndRepairBrokenWearable(WearableType.Shape, invService, userID, appearance); | ||
808 | resetwearable = true; | ||
809 | |||
810 | } | ||
811 | |||
812 | } | ||
813 | // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
814 | if (appearance.Wearables[(int)WearableType.Hair] == null) | ||
815 | { | ||
816 | m_log.WarnFormat("[AVFACTORY]: {0} Hair is Null, passing existing values.", (WearableType.Hair)); | ||
817 | |||
818 | TryAndRepairBrokenWearable(WearableType.Hair, invService, userID, appearance); | ||
819 | resetwearable = true; | ||
820 | } | ||
821 | else | ||
822 | { | ||
823 | if (appearance.Wearables[(int)WearableType.Hair][0].ItemID == UUID.Zero) | ||
824 | { | ||
825 | m_log.WarnFormat("[AVFACTORY]: Hair is UUID.Zero and broken, {0} {1}", | ||
826 | appearance.Wearables[(int)WearableType.Hair][0].ItemID, | ||
827 | appearance.Wearables[(int)WearableType.Hair][0].AssetID); | ||
828 | TryAndRepairBrokenWearable(WearableType.Hair, invService, userID, appearance); | ||
829 | resetwearable = true; | ||
830 | |||
831 | } | ||
832 | |||
833 | } | ||
834 | // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
835 | if (appearance.Wearables[(int)WearableType.Skin] == null) | ||
836 | { | ||
837 | m_log.WarnFormat("[AVFACTORY]: {0} Skin is Null, passing existing values.", (WearableType.Skin)); | ||
838 | |||
839 | TryAndRepairBrokenWearable(WearableType.Skin, invService, userID, appearance); | ||
840 | resetwearable = true; | ||
841 | } | ||
842 | else | ||
843 | { | ||
844 | if (appearance.Wearables[(int)WearableType.Skin][0].ItemID == UUID.Zero) | ||
845 | { | ||
846 | m_log.WarnFormat("[AVFACTORY]: Skin is UUID.Zero and broken, {0} {1}", | ||
847 | appearance.Wearables[(int)WearableType.Skin][0].ItemID, | ||
848 | appearance.Wearables[(int)WearableType.Skin][0].AssetID); | ||
849 | TryAndRepairBrokenWearable(WearableType.Skin, invService, userID, appearance); | ||
850 | resetwearable = true; | ||
851 | |||
852 | } | ||
853 | |||
854 | } | ||
855 | if (resetwearable) | ||
856 | { | ||
857 | ScenePresence presence = null; | ||
858 | if (m_scene.TryGetScenePresence(userID, out presence)) | ||
859 | { | ||
860 | presence.ControllingClient.SendWearables(presence.Appearance.Wearables, | ||
861 | presence.Appearance.Serial++); | ||
862 | } | ||
863 | } | ||
864 | |||
865 | } | 736 | } |
866 | else | 737 | else |
867 | { | 738 | { |
868 | m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); | 739 | m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); |
869 | } | 740 | } |
741 | |||
742 | // IInventoryService invService = m_scene.InventoryService; | ||
743 | // bool resetwearable = false; | ||
744 | // if (invService.GetRootFolder(userID) != null) | ||
745 | // { | ||
746 | // for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | ||
747 | // { | ||
748 | // for (int j = 0; j < appearance.Wearables[i].Count; j++) | ||
749 | // { | ||
750 | // // Check if the default wearables are not set | ||
751 | // if (appearance.Wearables[i][j].ItemID == UUID.Zero) | ||
752 | // { | ||
753 | // switch ((WearableType) i) | ||
754 | // { | ||
755 | // case WearableType.Eyes: | ||
756 | // case WearableType.Hair: | ||
757 | // case WearableType.Shape: | ||
758 | // case WearableType.Skin: | ||
759 | // //case WearableType.Underpants: | ||
760 | // TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | ||
761 | // resetwearable = true; | ||
762 | // m_log.Warn("[AVFACTORY]: UUID.Zero Wearables, passing fake values."); | ||
763 | // resetwearable = true; | ||
764 | // break; | ||
765 | // | ||
766 | // } | ||
767 | // continue; | ||
768 | // } | ||
769 | // | ||
770 | // // Ignore ruth's assets except for the body parts! missing body parts fail avatar appearance on V1 | ||
771 | // if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) | ||
772 | // { | ||
773 | // switch ((WearableType)i) | ||
774 | // { | ||
775 | // case WearableType.Eyes: | ||
776 | // case WearableType.Hair: | ||
777 | // case WearableType.Shape: | ||
778 | // case WearableType.Skin: | ||
779 | // //case WearableType.Underpants: | ||
780 | // TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | ||
781 | // | ||
782 | // m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i); | ||
783 | // resetwearable = true; | ||
784 | // break; | ||
785 | // | ||
786 | // } | ||
787 | // continue; | ||
788 | // } | ||
789 | // | ||
790 | // InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); | ||
791 | // baseItem = invService.GetItem(baseItem); | ||
792 | // | ||
793 | // if (baseItem != null) | ||
794 | // { | ||
795 | // appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); | ||
796 | // int unmodifiedWearableIndexForClosure = i; | ||
797 | // m_scene.AssetService.Get(baseItem.AssetID.ToString(), this, | ||
798 | // delegate(string x, object y, AssetBase z) | ||
799 | // { | ||
800 | // if (z == null) | ||
801 | // { | ||
802 | // TryAndRepairBrokenWearable( | ||
803 | // (WearableType)unmodifiedWearableIndexForClosure, invService, | ||
804 | // userID, appearance); | ||
805 | // } | ||
806 | // }); | ||
807 | // } | ||
808 | // else | ||
809 | // { | ||
810 | // m_log.ErrorFormat( | ||
811 | // "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", | ||
812 | // appearance.Wearables[i][j].ItemID, (WearableType)i); | ||
813 | // | ||
814 | // TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); | ||
815 | // resetwearable = true; | ||
816 | // | ||
817 | // } | ||
818 | // } | ||
819 | // } | ||
820 | // | ||
821 | // // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
822 | // if (appearance.Wearables[(int) WearableType.Eyes] == null) | ||
823 | // { | ||
824 | // m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes)); | ||
825 | // | ||
826 | // TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); | ||
827 | // resetwearable = true; | ||
828 | // } | ||
829 | // else | ||
830 | // { | ||
831 | // if (appearance.Wearables[(int) WearableType.Eyes][0].ItemID == UUID.Zero) | ||
832 | // { | ||
833 | // m_log.WarnFormat("[AVFACTORY]: Eyes are UUID.Zero are broken, {0} {1}", | ||
834 | // appearance.Wearables[(int) WearableType.Eyes][0].ItemID, | ||
835 | // appearance.Wearables[(int) WearableType.Eyes][0].AssetID); | ||
836 | // TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); | ||
837 | // resetwearable = true; | ||
838 | // | ||
839 | // } | ||
840 | // | ||
841 | // } | ||
842 | // // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
843 | // if (appearance.Wearables[(int)WearableType.Shape] == null) | ||
844 | // { | ||
845 | // m_log.WarnFormat("[AVFACTORY]: {0} shape is Null, passing existing values.", (WearableType.Shape)); | ||
846 | // | ||
847 | // TryAndRepairBrokenWearable(WearableType.Shape, invService, userID, appearance); | ||
848 | // resetwearable = true; | ||
849 | // } | ||
850 | // else | ||
851 | // { | ||
852 | // if (appearance.Wearables[(int)WearableType.Shape][0].ItemID == UUID.Zero) | ||
853 | // { | ||
854 | // m_log.WarnFormat("[AVFACTORY]: Shape is UUID.Zero and broken, {0} {1}", | ||
855 | // appearance.Wearables[(int)WearableType.Shape][0].ItemID, | ||
856 | // appearance.Wearables[(int)WearableType.Shape][0].AssetID); | ||
857 | // TryAndRepairBrokenWearable(WearableType.Shape, invService, userID, appearance); | ||
858 | // resetwearable = true; | ||
859 | // | ||
860 | // } | ||
861 | // | ||
862 | // } | ||
863 | // // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
864 | // if (appearance.Wearables[(int)WearableType.Hair] == null) | ||
865 | // { | ||
866 | // m_log.WarnFormat("[AVFACTORY]: {0} Hair is Null, passing existing values.", (WearableType.Hair)); | ||
867 | // | ||
868 | // TryAndRepairBrokenWearable(WearableType.Hair, invService, userID, appearance); | ||
869 | // resetwearable = true; | ||
870 | // } | ||
871 | // else | ||
872 | // { | ||
873 | // if (appearance.Wearables[(int)WearableType.Hair][0].ItemID == UUID.Zero) | ||
874 | // { | ||
875 | // m_log.WarnFormat("[AVFACTORY]: Hair is UUID.Zero and broken, {0} {1}", | ||
876 | // appearance.Wearables[(int)WearableType.Hair][0].ItemID, | ||
877 | // appearance.Wearables[(int)WearableType.Hair][0].AssetID); | ||
878 | // TryAndRepairBrokenWearable(WearableType.Hair, invService, userID, appearance); | ||
879 | // resetwearable = true; | ||
880 | // | ||
881 | // } | ||
882 | // | ||
883 | // } | ||
884 | // // I don't know why we have to test for this again... but the above switches do not capture these scenarios for some reason.... | ||
885 | // if (appearance.Wearables[(int)WearableType.Skin] == null) | ||
886 | // { | ||
887 | // m_log.WarnFormat("[AVFACTORY]: {0} Skin is Null, passing existing values.", (WearableType.Skin)); | ||
888 | // | ||
889 | // TryAndRepairBrokenWearable(WearableType.Skin, invService, userID, appearance); | ||
890 | // resetwearable = true; | ||
891 | // } | ||
892 | // else | ||
893 | // { | ||
894 | // if (appearance.Wearables[(int)WearableType.Skin][0].ItemID == UUID.Zero) | ||
895 | // { | ||
896 | // m_log.WarnFormat("[AVFACTORY]: Skin is UUID.Zero and broken, {0} {1}", | ||
897 | // appearance.Wearables[(int)WearableType.Skin][0].ItemID, | ||
898 | // appearance.Wearables[(int)WearableType.Skin][0].AssetID); | ||
899 | // TryAndRepairBrokenWearable(WearableType.Skin, invService, userID, appearance); | ||
900 | // resetwearable = true; | ||
901 | // | ||
902 | // } | ||
903 | // | ||
904 | // } | ||
905 | // if (resetwearable) | ||
906 | // { | ||
907 | // ScenePresence presence = null; | ||
908 | // if (m_scene.TryGetScenePresence(userID, out presence)) | ||
909 | // { | ||
910 | // presence.ControllingClient.SendWearables(presence.Appearance.Wearables, | ||
911 | // presence.Appearance.Serial++); | ||
912 | // } | ||
913 | // } | ||
914 | // | ||
915 | // } | ||
916 | // else | ||
917 | // { | ||
918 | // m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); | ||
919 | // } | ||
870 | } | 920 | } |
921 | |||
871 | private void TryAndRepairBrokenWearable(WearableType type, IInventoryService invService, UUID userID,AvatarAppearance appearance) | 922 | private void TryAndRepairBrokenWearable(WearableType type, IInventoryService invService, UUID userID,AvatarAppearance appearance) |
872 | { | 923 | { |
873 | UUID defaultwearable = GetDefaultItem(type); | 924 | UUID defaultwearable = GetDefaultItem(type); |
@@ -957,6 +1008,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
957 | } | 1008 | } |
958 | } | 1009 | } |
959 | } | 1010 | } |
1011 | |||
960 | private UUID GetDefaultItem(WearableType wearable) | 1012 | private UUID GetDefaultItem(WearableType wearable) |
961 | { | 1013 | { |
962 | // These are ruth | 1014 | // These are ruth |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs index 7bf19c2..c51b30f 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | |||
@@ -282,7 +282,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
282 | string uasURL = circuit.ServiceURLs["HomeURI"].ToString(); | 282 | string uasURL = circuit.ServiceURLs["HomeURI"].ToString(); |
283 | m_log.DebugFormat("[HG MESSAGE TRANSFER]: getting UUI of user {0} from {1}", toAgent, uasURL); | 283 | m_log.DebugFormat("[HG MESSAGE TRANSFER]: getting UUI of user {0} from {1}", toAgent, uasURL); |
284 | UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uasURL); | 284 | UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uasURL); |
285 | return uasConn.GetUUI(fromAgent, toAgent); | 285 | |
286 | string agentUUI = string.Empty; | ||
287 | try | ||
288 | { | ||
289 | agentUUI = uasConn.GetUUI(fromAgent, toAgent); | ||
290 | } | ||
291 | catch (Exception e) { | ||
292 | m_log.Debug("[HG MESSAGE TRANSFER]: GetUUI call failed ", e); | ||
293 | } | ||
294 | |||
295 | return agentUUI; | ||
286 | } | 296 | } |
287 | } | 297 | } |
288 | } | 298 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 2da0a74..f3e757a 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -1164,7 +1164,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1164 | 1164 | ||
1165 | UserAgentServiceConnector uConn = new UserAgentServiceConnector(home_url); | 1165 | UserAgentServiceConnector uConn = new UserAgentServiceConnector(home_url); |
1166 | 1166 | ||
1167 | Dictionary<string, object> account = uConn.GetUserInfo(userID); | 1167 | Dictionary<string, object> account; |
1168 | try | ||
1169 | { | ||
1170 | account = uConn.GetUserInfo(userID); | ||
1171 | } | ||
1172 | catch (Exception e) | ||
1173 | { | ||
1174 | m_log.Debug("[PROFILES]: GetUserInfo call failed ", e); | ||
1175 | account = new Dictionary<string, object>(); | ||
1176 | } | ||
1168 | 1177 | ||
1169 | if (account.Count > 0) | 1178 | if (account.Count > 0) |
1170 | { | 1179 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index a038f73..c9adc37 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
464 | sp.Name, position, sp.Scene.RegionInfo.RegionName); | 464 | sp.Name, position, sp.Scene.RegionInfo.RegionName); |
465 | 465 | ||
466 | // Teleport within the same region | 466 | // Teleport within the same region |
467 | if (IsOutsideRegion(sp.Scene, position) || position.Z < 0) | 467 | if (!sp.Scene.PositionIsInCurrentRegion(position) || position.Z < 0) |
468 | { | 468 | { |
469 | Vector3 emergencyPos = new Vector3(128, 128, 128); | 469 | Vector3 emergencyPos = new Vector3(128, 128, 128); |
470 | 470 | ||
@@ -580,7 +580,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
580 | MapBlockData block = new MapBlockData(); | 580 | MapBlockData block = new MapBlockData(); |
581 | block.X = (ushort)regX; | 581 | block.X = (ushort)regX; |
582 | block.Y = (ushort)regY; | 582 | block.Y = (ushort)regY; |
583 | block.Access = 254; // == not there | 583 | block.Access = (byte)SimAccess.Down; |
584 | 584 | ||
585 | List<MapBlockData> blocks = new List<MapBlockData>(); | 585 | List<MapBlockData> blocks = new List<MapBlockData>(); |
586 | blocks.Add(block); | 586 | blocks.Add(block); |
@@ -713,10 +713,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
713 | return; | 713 | return; |
714 | } | 714 | } |
715 | 715 | ||
716 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 716 | uint newRegionX, newRegionY, oldRegionX, oldRegionY; |
717 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); | 717 | Util.RegionHandleToRegionLoc(reg.RegionHandle, out newRegionX, out newRegionY); |
718 | uint oldRegionX = (uint)(sp.Scene.RegionInfo.RegionHandle >> 40); | 718 | Util.RegionHandleToRegionLoc(sp.Scene.RegionInfo.RegionHandle, out oldRegionX, out oldRegionY); |
719 | uint oldRegionY = (((uint)(sp.Scene.RegionInfo.RegionHandle)) >> 8); | ||
720 | 719 | ||
721 | ulong destinationHandle = finalDestination.RegionHandle; | 720 | ulong destinationHandle = finalDestination.RegionHandle; |
722 | 721 | ||
@@ -1333,6 +1332,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1333 | return region; | 1332 | return region; |
1334 | } | 1333 | } |
1335 | 1334 | ||
1335 | // This returns 'true' if the new region already has a child agent for our | ||
1336 | // incoming agent. The implication is that, if 'false', we have to create the | ||
1337 | // child and then teleport into the region. | ||
1336 | protected virtual bool NeedsNewAgent(float drawdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY) | 1338 | protected virtual bool NeedsNewAgent(float drawdist, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY) |
1337 | { | 1339 | { |
1338 | if (m_regionCombinerModule != null && m_regionCombinerModule.IsRootForMegaregion(Scene.RegionInfo.RegionID)) | 1340 | if (m_regionCombinerModule != null && m_regionCombinerModule.IsRootForMegaregion(Scene.RegionInfo.RegionID)) |
@@ -1357,20 +1359,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1357 | return Util.IsOutsideView(drawdist, oldRegionX, newRegionX, oldRegionY, newRegionY); | 1359 | return Util.IsOutsideView(drawdist, oldRegionX, newRegionX, oldRegionY, newRegionY); |
1358 | } | 1360 | } |
1359 | 1361 | ||
1360 | protected virtual bool IsOutsideRegion(Scene s, Vector3 pos) | ||
1361 | { | ||
1362 | if (s.TestBorderCross(pos, Cardinals.N)) | ||
1363 | return true; | ||
1364 | if (s.TestBorderCross(pos, Cardinals.S)) | ||
1365 | return true; | ||
1366 | if (s.TestBorderCross(pos, Cardinals.E)) | ||
1367 | return true; | ||
1368 | if (s.TestBorderCross(pos, Cardinals.W)) | ||
1369 | return true; | ||
1370 | |||
1371 | return false; | ||
1372 | } | ||
1373 | |||
1374 | #endregion | 1362 | #endregion |
1375 | 1363 | ||
1376 | #region Landmark Teleport | 1364 | #region Landmark Teleport |
@@ -1455,10 +1443,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1455 | // see that it is actually outside the current region), find the new region that the | 1443 | // see that it is actually outside the current region), find the new region that the |
1456 | // point is actually in. | 1444 | // point is actually in. |
1457 | // Returns the coordinates and information of the new region or 'null' of it doesn't exist. | 1445 | // Returns the coordinates and information of the new region or 'null' of it doesn't exist. |
1458 | public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out string version, out Vector3 newpos) | 1446 | public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, |
1447 | out string version, out Vector3 newpos, out string failureReason) | ||
1459 | { | 1448 | { |
1460 | version = String.Empty; | 1449 | version = String.Empty; |
1461 | newpos = pos; | 1450 | newpos = pos; |
1451 | failureReason = string.Empty; | ||
1462 | 1452 | ||
1463 | // m_log.DebugFormat( | 1453 | // m_log.DebugFormat( |
1464 | // "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name); | 1454 | // "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name); |
@@ -1475,12 +1465,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1475 | if (neighbourRegion != null) | 1465 | if (neighbourRegion != null) |
1476 | { | 1466 | { |
1477 | // Compute the entity's position relative to the new region | 1467 | // Compute the entity's position relative to the new region |
1478 | newpos = new Vector3( (float)(presenceWorldX - (double)neighbourRegion.RegionLocX), | 1468 | newpos = new Vector3((float)(presenceWorldX - (double)neighbourRegion.RegionLocX), |
1479 | (float)(presenceWorldY - (double)neighbourRegion.RegionLocY), | 1469 | (float)(presenceWorldY - (double)neighbourRegion.RegionLocY), |
1480 | pos.Z); | 1470 | pos.Z); |
1481 | 1471 | ||
1482 | if (m_bannedRegionCache.IfBanned(neighbourRegion.RegionHandle, agentID)) | 1472 | if (m_bannedRegionCache.IfBanned(neighbourRegion.RegionHandle, agentID)) |
1483 | { | 1473 | { |
1474 | failureReason = "Cannot region cross into banned parcel"; | ||
1484 | neighbourRegion = null; | 1475 | neighbourRegion = null; |
1485 | } | 1476 | } |
1486 | else | 1477 | else |
@@ -1490,15 +1481,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1490 | } | 1481 | } |
1491 | 1482 | ||
1492 | // Check to see if we have access to the target region. | 1483 | // Check to see if we have access to the target region. |
1493 | string reason; | ||
1494 | if (neighbourRegion != null | 1484 | if (neighbourRegion != null |
1495 | && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, newpos, out version, out reason)) | 1485 | && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, newpos, out version, out failureReason)) |
1496 | { | 1486 | { |
1497 | // remember banned | 1487 | // remember banned |
1498 | m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); | 1488 | m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); |
1499 | neighbourRegion = null; | 1489 | neighbourRegion = null; |
1500 | } | 1490 | } |
1501 | } | 1491 | } |
1492 | else | ||
1493 | { | ||
1494 | // The destination region just doesn't exist | ||
1495 | failureReason = "Cannot cross into non-existant region"; | ||
1496 | } | ||
1502 | 1497 | ||
1503 | if (neighbourRegion == null) | 1498 | if (neighbourRegion == null) |
1504 | m_log.DebugFormat("{0} GetDestination: region not found. Old region name={1} at <{2},{3}> of size <{4},{5}>. Old pos={6}", | 1499 | m_log.DebugFormat("{0} GetDestination: region not found. Old region name={1} at <{2},{3}> of size <{4},{5}>. Old pos={6}", |
@@ -1521,11 +1516,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1521 | uint y; | 1516 | uint y; |
1522 | Vector3 newpos; | 1517 | Vector3 newpos; |
1523 | string version; | 1518 | string version; |
1519 | string failureReason; | ||
1524 | 1520 | ||
1525 | GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out version, out newpos); | 1521 | GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, |
1522 | out version, out newpos, out failureReason); | ||
1526 | if (neighbourRegion == null) | 1523 | if (neighbourRegion == null) |
1527 | { | 1524 | { |
1528 | agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel"); | 1525 | agent.ControllingClient.SendAlertMessage(failureReason); |
1529 | return false; | 1526 | return false; |
1530 | } | 1527 | } |
1531 | 1528 | ||
@@ -1534,6 +1531,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1534 | CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; | 1531 | CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; |
1535 | d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); | 1532 | d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); |
1536 | 1533 | ||
1534 | Scene.EventManager.TriggerCrossAgentToNewRegion(agent, isFlying, neighbourRegion); | ||
1535 | |||
1537 | return true; | 1536 | return true; |
1538 | } | 1537 | } |
1539 | 1538 | ||
@@ -2077,7 +2076,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2077 | public NotFoundLocationCache() | 2076 | public NotFoundLocationCache() |
2078 | { | 2077 | { |
2079 | } | 2078 | } |
2080 | // Add an area to the lost of 'not found' places. The area is the snapped region | 2079 | // Add an area to the list of 'not found' places. The area is the snapped region |
2081 | // area around the added point. | 2080 | // area around the added point. |
2082 | public void Add(double pX, double pY) | 2081 | public void Add(double pX, double pY) |
2083 | { | 2082 | { |
@@ -2305,23 +2304,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2305 | /// <param name='neCorner'></param> | 2304 | /// <param name='neCorner'></param> |
2306 | private void GetMegaregionViewRange(out Vector2 swCorner, out Vector2 neCorner) | 2305 | private void GetMegaregionViewRange(out Vector2 swCorner, out Vector2 neCorner) |
2307 | { | 2306 | { |
2308 | Border[] northBorders = Scene.NorthBorders.ToArray(); | ||
2309 | Border[] eastBorders = Scene.EastBorders.ToArray(); | ||
2310 | |||
2311 | Vector2 extent = Vector2.Zero; | 2307 | Vector2 extent = Vector2.Zero; |
2312 | for (int i = 0; i < eastBorders.Length; i++) | 2308 | |
2313 | { | 2309 | if (m_regionCombinerModule != null) |
2314 | extent.X = (eastBorders[i].BorderLine.Z > extent.X) ? eastBorders[i].BorderLine.Z : extent.X; | ||
2315 | } | ||
2316 | for (int i = 0; i < northBorders.Length; i++) | ||
2317 | { | 2310 | { |
2318 | extent.Y = (northBorders[i].BorderLine.Z > extent.Y) ? northBorders[i].BorderLine.Z : extent.Y; | 2311 | Vector2 megaRegionSize = m_regionCombinerModule.GetSizeOfMegaregion(Scene.RegionInfo.RegionID); |
2312 | extent.X = (float)Util.WorldToRegionLoc((uint)megaRegionSize.X); | ||
2313 | extent.Y = (float)Util.WorldToRegionLoc((uint)megaRegionSize.Y); | ||
2319 | } | 2314 | } |
2320 | 2315 | ||
2321 | // Loss of fraction on purpose | ||
2322 | extent.X = ((int)extent.X / (int)Constants.RegionSize); | ||
2323 | extent.Y = ((int)extent.Y / (int)Constants.RegionSize); | ||
2324 | |||
2325 | swCorner.X = Scene.RegionInfo.RegionLocX - 1; | 2316 | swCorner.X = Scene.RegionInfo.RegionLocX - 1; |
2326 | swCorner.Y = Scene.RegionInfo.RegionLocY - 1; | 2317 | swCorner.Y = Scene.RegionInfo.RegionLocY - 1; |
2327 | neCorner.X = Scene.RegionInfo.RegionLocX + extent.X; | 2318 | neCorner.X = Scene.RegionInfo.RegionLocX + extent.X; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 09b1975..e354522 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -462,7 +462,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
462 | 462 | ||
463 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); | 463 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); |
464 | Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY; | 464 | Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY; |
465 | GridRegion finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt); | 465 | |
466 | GridRegion finalDestination = null; | ||
467 | try | ||
468 | { | ||
469 | finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt); | ||
470 | } | ||
471 | catch (Exception e) | ||
472 | { | ||
473 | m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e); | ||
474 | } | ||
475 | |||
466 | if (finalDestination == null) | 476 | if (finalDestination == null) |
467 | { | 477 | { |
468 | client.SendTeleportFailed("Your home region could not be found"); | 478 | client.SendTeleportFailed("Your home region could not be found"); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs index 245c808..7b89c2c 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs | |||
@@ -130,7 +130,17 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
130 | } | 130 | } |
131 | 131 | ||
132 | UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); | 132 | UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); |
133 | UUID userID = uasConn.GetUUID(names[0], names[1]); | 133 | |
134 | UUID userID = UUID.Zero; | ||
135 | try | ||
136 | { | ||
137 | userID = uasConn.GetUUID(names[0], names[1]); | ||
138 | } | ||
139 | catch (Exception e) | ||
140 | { | ||
141 | m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e); | ||
142 | } | ||
143 | |||
134 | if (!userID.Equals(UUID.Zero)) | 144 | if (!userID.Equals(UUID.Zero)) |
135 | { | 145 | { |
136 | UserData ud = new UserData(); | 146 | UserData ud = new UserData(); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 3fb5195..9f0a719 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -473,7 +473,16 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
473 | // serverType, userdata.HomeURL, userID); | 473 | // serverType, userdata.HomeURL, userID); |
474 | 474 | ||
475 | UserAgentServiceConnector uConn = new UserAgentServiceConnector(userdata.HomeURL); | 475 | UserAgentServiceConnector uConn = new UserAgentServiceConnector(userdata.HomeURL); |
476 | userdata.ServerURLs = uConn.GetServerURLs(userID); | 476 | try |
477 | { | ||
478 | userdata.ServerURLs = uConn.GetServerURLs(userID); | ||
479 | } | ||
480 | catch (Exception e) | ||
481 | { | ||
482 | m_log.Debug("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e); | ||
483 | userdata.ServerURLs = new Dictionary<string, object>(); | ||
484 | } | ||
485 | |||
477 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) | 486 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) |
478 | return userdata.ServerURLs[serverType].ToString(); | 487 | return userdata.ServerURLs[serverType].ToString(); |
479 | } | 488 | } |
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs index 79a409d..8a649ab 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs | |||
@@ -126,7 +126,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
126 | foreach (MapBlockData b in mapBlocks) | 126 | foreach (MapBlockData b in mapBlocks) |
127 | { | 127 | { |
128 | b.Name = string.Empty; | 128 | b.Name = string.Empty; |
129 | b.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's | 129 | // Set 'simulator is offline'. We need this because the viewer ignores SimAccess.Unknown (255) |
130 | b.Access = (byte)SimAccess.Down; | ||
130 | } | 131 | } |
131 | 132 | ||
132 | m_log.DebugFormat("[HG MAP]: Resetting {0} blocks", mapBlocks.Count); | 133 | m_log.DebugFormat("[HG MAP]: Resetting {0} blocks", mapBlocks.Count); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs index 56d9937..bda354f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs | |||
@@ -125,14 +125,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour | |||
125 | public OpenSim.Services.Interfaces.GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) | 125 | public OpenSim.Services.Interfaces.GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) |
126 | { | 126 | { |
127 | uint x, y; | 127 | uint x, y; |
128 | Utils.LongToUInts(regionHandle, out x, out y); | 128 | Util.RegionHandleToRegionLoc(regionHandle, out x, out y); |
129 | 129 | ||
130 | foreach (Scene s in m_Scenes) | 130 | foreach (Scene s in m_Scenes) |
131 | { | 131 | { |
132 | if (s.RegionInfo.RegionHandle == regionHandle) | 132 | if (s.RegionInfo.RegionHandle == regionHandle) |
133 | { | 133 | { |
134 | m_log.DebugFormat("[LOCAL NEIGHBOUR SERVICE CONNECTOR]: HelloNeighbour from region {0} to neighbour {1} at {2}-{3}", | 134 | m_log.DebugFormat("[LOCAL NEIGHBOUR SERVICE CONNECTOR]: HelloNeighbour from region {0} to neighbour {1} at {2}-{3}", |
135 | thisRegion.RegionName, s.Name, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y) ); | 135 | thisRegion.RegionName, s.Name, x, y ); |
136 | 136 | ||
137 | //m_log.Debug("[NEIGHBOUR CONNECTOR]: Found region to SendHelloNeighbour"); | 137 | //m_log.Debug("[NEIGHBOUR CONNECTOR]: Found region to SendHelloNeighbour"); |
138 | return s.IncomingHelloNeighbour(thisRegion); | 138 | return s.IncomingHelloNeighbour(thisRegion); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 0c4b79b..2e638d4 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
483 | SceneObjectGroup sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject); | 483 | SceneObjectGroup sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject); |
484 | 484 | ||
485 | // Happily this does not do much to the object since it hasn't been added to the scene yet | 485 | // Happily this does not do much to the object since it hasn't been added to the scene yet |
486 | if (sceneObject.AttachmentPoint == 0) | 486 | if (!sceneObject.IsAttachment) |
487 | { | 487 | { |
488 | if (m_displacement != Vector3.Zero || m_rotation != 0f) | 488 | if (m_displacement != Vector3.Zero || m_rotation != 0f) |
489 | { | 489 | { |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 5728731..be328a7 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -631,16 +631,29 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
631 | private warp_Texture GetTexture(UUID id) | 631 | private warp_Texture GetTexture(UUID id) |
632 | { | 632 | { |
633 | warp_Texture ret = null; | 633 | warp_Texture ret = null; |
634 | |||
634 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); | 635 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); |
636 | |||
635 | if (asset != null) | 637 | if (asset != null) |
636 | { | 638 | { |
637 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); | 639 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); |
638 | Bitmap img = (Bitmap) imgDecoder.DecodeToImage(asset); | 640 | Bitmap img = null; |
641 | |||
642 | try | ||
643 | { | ||
644 | img = (Bitmap)imgDecoder.DecodeToImage(asset); | ||
645 | } | ||
646 | catch (Exception e) | ||
647 | { | ||
648 | m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); | ||
649 | } | ||
650 | |||
639 | if (img != null) | 651 | if (img != null) |
640 | { | 652 | { |
641 | return new warp_Texture(img); | 653 | return new warp_Texture(img); |
642 | } | 654 | } |
643 | } | 655 | } |
656 | |||
644 | return ret; | 657 | return ret; |
645 | } | 658 | } |
646 | 659 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 1fb1aba..c35f6b7 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
214 | // final block, closing the search result | 214 | // final block, closing the search result |
215 | MapBlockData data = new MapBlockData(); | 215 | MapBlockData data = new MapBlockData(); |
216 | data.Agents = 0; | 216 | data.Agents = 0; |
217 | data.Access = 255; | 217 | data.Access = (byte)SimAccess.NonExistent; |
218 | data.MapImageId = UUID.Zero; | 218 | data.MapImageId = UUID.Zero; |
219 | data.Name = ""; | 219 | data.Name = ""; |
220 | data.RegionFlags = 0; | 220 | data.RegionFlags = 0; |