aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs216
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs27
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs15
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs15
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs10
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs5
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs2
8 files changed, 185 insertions, 110 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index d3c1102..c6956fc 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Linq;
31using System.Net; 32using System.Net;
32using System.Reflection; 33using System.Reflection;
33using System.Text; 34using System.Text;
@@ -67,6 +68,9 @@ namespace OpenSim
67 private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache"; 68 private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
68 private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient"; 69 private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
69 70
71 // OpenSim.ini Section name for ESTATES Settings
72 public const string ESTATE_SECTION_NAME = "Estates";
73
70 protected string proxyUrl; 74 protected string proxyUrl;
71 protected int proxyOffset = 0; 75 protected int proxyOffset = 0;
72 76
@@ -445,12 +449,42 @@ namespace OpenSim
445 { 449 {
446 RegionInfo regionInfo = scene.RegionInfo; 450 RegionInfo regionInfo = scene.RegionInfo;
447 451
452 string estateOwnerFirstName = null;
453 string estateOwnerLastName = null;
454 string estateOwnerEMail = null;
455 string estateOwnerPassword = null;
456 string rawEstateOwnerUuid = null;
457
458 if (m_config.Source.Configs[ESTATE_SECTION_NAME] != null)
459 {
460 string defaultEstateOwnerName
461 = m_config.Source.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerName", "").Trim();
462 string[] ownerNames = defaultEstateOwnerName.Split(' ');
463
464 if (ownerNames.Length >= 2)
465 {
466 estateOwnerFirstName = ownerNames[0];
467 estateOwnerLastName = ownerNames[1];
468 }
469
470 // Info to be used only on Standalone Mode
471 rawEstateOwnerUuid = m_config.Source.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerUUID", null);
472 estateOwnerEMail = m_config.Source.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerEMail", null);
473 estateOwnerPassword = m_config.Source.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null);
474 }
475
448 MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName); 476 MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName);
449 List<char> excluded = new List<char>(new char[1]{' '}); 477 List<char> excluded = new List<char>(new char[1]{' '});
450 string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
451 string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
452 478
453 UserAccount account = scene.UserAccountService.GetUserAccount(regionInfo.ScopeID, first, last); 479
480 if (estateOwnerFirstName == null || estateOwnerLastName == null)
481 {
482 estateOwnerFirstName = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
483 estateOwnerLastName = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
484 }
485
486 UserAccount account
487 = scene.UserAccountService.GetUserAccount(regionInfo.ScopeID, estateOwnerFirstName, estateOwnerLastName);
454 488
455 if (account == null) 489 if (account == null)
456 { 490 {
@@ -469,23 +503,35 @@ namespace OpenSim
469 503
470 if (scene.UserAccountService is UserAccountService) 504 if (scene.UserAccountService is UserAccountService)
471 { 505 {
472 string password = MainConsole.Instance.PasswdPrompt("Password"); 506 if (estateOwnerPassword == null)
473 string email = MainConsole.Instance.CmdPrompt("Email", ""); 507 estateOwnerPassword = MainConsole.Instance.PasswdPrompt("Password");
508
509 if (estateOwnerEMail == null)
510 estateOwnerEMail = MainConsole.Instance.CmdPrompt("Email");
474 511
475 string rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); 512 if (rawEstateOwnerUuid == null)
513 rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
476 514
477 UUID principalId = UUID.Zero; 515 UUID estateOwnerUuid = UUID.Zero;
478 if (!UUID.TryParse(rawPrincipalId, out principalId)) 516 if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
479 { 517 {
480 m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawPrincipalId); 518 m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawEstateOwnerUuid);
481 return; 519 return;
482 } 520 }
483 521
522 // If we've been given a zero uuid then this signals that we should use a random user id
523 if (estateOwnerUuid == UUID.Zero)
524 estateOwnerUuid = UUID.Random();
525
484 account 526 account
485 = ((UserAccountService)scene.UserAccountService).CreateUser( 527 = ((UserAccountService)scene.UserAccountService).CreateUser(
486 regionInfo.ScopeID, principalId, first, last, password, email); 528 regionInfo.ScopeID,
529 estateOwnerUuid,
530 estateOwnerFirstName,
531 estateOwnerLastName,
532 estateOwnerPassword,
533 estateOwnerEMail);
487 } 534 }
488// }
489 } 535 }
490 536
491 if (account == null) 537 if (account == null)
@@ -885,15 +931,21 @@ namespace OpenSim
885 /// This method doesn't allow an estate to be created with the same name as existing estates. 931 /// This method doesn't allow an estate to be created with the same name as existing estates.
886 /// </remarks> 932 /// </remarks>
887 /// <param name="regInfo"></param> 933 /// <param name="regInfo"></param>
888 /// <param name="existingName">A list of estate names that already exist.</param> 934 /// <param name="estatesByName">A list of estate names that already exist.</param>
935 /// <param name="estateName">Estate name to create if already known</param>
889 /// <returns>true if the estate was created, false otherwise</returns> 936 /// <returns>true if the estate was created, false otherwise</returns>
890 public bool CreateEstate(RegionInfo regInfo, List<string> existingNames) 937 public bool CreateEstate(RegionInfo regInfo, Dictionary<string, EstateSettings> estatesByName, string estateName)
891 { 938 {
892 // Create a new estate 939 // Create a new estate
893 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true); 940 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
894 string newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
895 941
896 if (existingNames.Contains(newName)) 942 string newName;
943 if (estateName != null && estateName != "")
944 newName = estateName;
945 else
946 newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
947
948 if (estatesByName.ContainsKey(newName))
897 { 949 {
898 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); 950 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
899 return false; 951 return false;
@@ -920,66 +972,102 @@ namespace OpenSim
920 if (EstateDataService != null) 972 if (EstateDataService != null)
921 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false); 973 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
922 974
923 if (regInfo.EstateSettings.EstateID == 0) // No record at all 975 if (regInfo.EstateSettings.EstateID != 0)
976 return;
977
978 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
979
980 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
981 Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>();
982
983 foreach (EstateSettings estate in estates)
984 estatesByName[estate.EstateName] = estate;
985
986 string defaultEstateName = null;
987
988 if (m_config.Source.Configs[ESTATE_SECTION_NAME] != null)
924 { 989 {
925 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); 990 defaultEstateName = m_config.Source.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateName", null);
926 991
927 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll(); 992 if (defaultEstateName != null)
928 List<string> estateNames = new List<string>();
929 foreach (EstateSettings estate in estates)
930 estateNames.Add(estate.EstateName);
931
932 while (true)
933 { 993 {
934 if (estates.Count == 0) 994 EstateSettings defaultEstate;
935 { 995 bool defaultEstateJoined = false;
936 m_log.Info("[ESTATE] No existing estates found. You must create a new one."); 996
937 997 if (estatesByName.ContainsKey(defaultEstateName))
938 if (CreateEstate(regInfo, estateNames)) 998 {
939 break; 999 defaultEstate = estatesByName[defaultEstateName];
1000
1001 if (EstateDataService.LinkRegion(regInfo.RegionID, (int)defaultEstate.EstateID))
1002 defaultEstateJoined = true;
1003 }
1004 else
1005 {
1006 if (CreateEstate(regInfo, estatesByName, defaultEstateName))
1007 defaultEstateJoined = true;
1008 }
1009
1010 if (defaultEstateJoined)
1011 return;
1012 else
1013 m_log.ErrorFormat(
1014 "[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName);
1015 }
1016 }
1017
1018 // If we have no default estate or creation of the default estate failed then ask the user.
1019 while (true)
1020 {
1021 if (estates.Count == 0)
1022 {
1023 m_log.Info("[ESTATE]: No existing estates found. You must create a new one.");
1024
1025 if (CreateEstate(regInfo, estatesByName, null))
1026 break;
1027 else
1028 continue;
1029 }
1030 else
1031 {
1032 string response
1033 = MainConsole.Instance.CmdPrompt(
1034 string.Format(
1035 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
1036 "yes",
1037 new List<string>() { "yes", "no" });
1038
1039 if (response == "no")
1040 {
1041 if (CreateEstate(regInfo, estatesByName, null))
1042 break;
940 else 1043 else
941 continue; 1044 continue;
942 } 1045 }
943 else 1046 else
944 { 1047 {
945 string response 1048 string[] estateNames = estatesByName.Keys.ToArray();
1049 response
946 = MainConsole.Instance.CmdPrompt( 1050 = MainConsole.Instance.CmdPrompt(
947 string.Format( 1051 string.Format(
948 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), 1052 "Name of estate to join. Existing estate names are ({0})",
949 "yes", 1053 string.Join(", ", estateNames)),
950 new List<string>() { "yes", "no" }); 1054 estateNames[0]);
951 1055
952 if (response == "no") 1056 List<int> estateIDs = EstateDataService.GetEstates(response);
1057 if (estateIDs.Count < 1)
953 { 1058 {
954 if (CreateEstate(regInfo, estateNames)) 1059 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again.");
955 break; 1060 continue;
956 else
957 continue;
958 }
959 else
960 {
961 response
962 = MainConsole.Instance.CmdPrompt(
963 string.Format(
964 "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())),
965 estateNames[0]);
966
967 List<int> estateIDs = EstateDataService.GetEstates(response);
968 if (estateIDs.Count < 1)
969 {
970 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again.");
971 continue;
972 }
973
974 int estateID = estateIDs[0];
975
976 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(estateID);
977
978 if (EstateDataService.LinkRegion(regInfo.RegionID, estateID))
979 break;
980
981 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
982 } 1061 }
1062
1063 int estateID = estateIDs[0];
1064
1065 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(estateID);
1066
1067 if (EstateDataService.LinkRegion(regInfo.RegionID, estateID))
1068 break;
1069
1070 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
983 } 1071 }
984 } 1072 }
985 } 1073 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index d98ff68..b388b10 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -317,7 +317,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
317 protected readonly UUID m_agentId; 317 protected readonly UUID m_agentId;
318 private readonly uint m_circuitCode; 318 private readonly uint m_circuitCode;
319 private readonly byte[] m_channelVersion = Utils.EmptyBytes; 319 private readonly byte[] m_channelVersion = Utils.EmptyBytes;
320 private readonly Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>();
321 private readonly IGroupsModule m_GroupsModule; 320 private readonly IGroupsModule m_GroupsModule;
322 321
323 private int m_cachedTextureSerial; 322 private int m_cachedTextureSerial;
@@ -452,10 +451,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
452 RegisterInterface<IClientChat>(this); 451 RegisterInterface<IClientChat>(this);
453 RegisterInterface<IClientIPEndpoint>(this); 452 RegisterInterface<IClientIPEndpoint>(this);
454 453
455 InitDefaultAnimations();
456
457 m_scene = scene; 454 m_scene = scene;
458
459 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); 455 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count);
460 m_entityProps = new PriorityQueue(m_scene.Entities.Count); 456 m_entityProps = new PriorityQueue(m_scene.Entities.Count);
461 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); 457 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
@@ -11210,30 +11206,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11210 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 11206 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
11211 } 11207 }
11212 11208
11213 private void InitDefaultAnimations()
11214 {
11215 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
11216 {
11217 XmlDocument doc = new XmlDocument();
11218 doc.Load(reader);
11219 if (doc.DocumentElement != null)
11220 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
11221 {
11222 if (nod.Attributes["name"] != null)
11223 {
11224 string name = nod.Attributes["name"].Value.ToLower();
11225 string id = nod.InnerText;
11226 m_defaultAnimations.Add(name, (UUID)id);
11227 }
11228 }
11229 }
11230 }
11231
11232 public UUID GetDefaultAnimation(string name) 11209 public UUID GetDefaultAnimation(string name)
11233 { 11210 {
11234 if (m_defaultAnimations.ContainsKey(name)) 11211 return SLUtil.GetDefaultAvatarAnimation(name);
11235 return m_defaultAnimations[name];
11236 return UUID.Zero;
11237 } 11212 }
11238 11213
11239 /// <summary> 11214 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 5238325..a26c73a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -270,12 +270,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
270 270
271 m_archiveWriter = new TarArchiveWriter(m_saveStream); 271 m_archiveWriter = new TarArchiveWriter(m_saveStream);
272 272
273 m_log.InfoFormat("[INVENTORY ARCHIVER]: Adding control file to archive.");
274
273 // Write out control file. This has to be done first so that subsequent loaders will see this file first 275 // Write out control file. This has to be done first so that subsequent loaders will see this file first
274 // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this 276 // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
275 // not sure how to fix this though, short of going with a completely different file format. 277 // not sure how to fix this though, short of going with a completely different file format.
276 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options)); 278 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options));
277 m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive."); 279
278
279 if (inventoryFolder != null) 280 if (inventoryFolder != null)
280 { 281 {
281 m_log.DebugFormat( 282 m_log.DebugFormat(
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index 9ec4ebe..c179a34 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -108,12 +108,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
108// "[ARCHIVER]: Received {0} of {1} assets requested", 108// "[ARCHIVER]: Received {0} of {1} assets requested",
109// assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); 109// assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count);
110 110
111 m_log.InfoFormat("[ARCHIVER]: Adding region settings to archive.");
112
111 // Write out region settings 113 // Write out region settings
112 string settingsPath 114 string settingsPath
113 = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); 115 = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName);
114 m_archiveWriter.WriteFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings)); 116 m_archiveWriter.WriteFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings));
115 117
116 m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); 118 m_log.InfoFormat("[ARCHIVER]: Adding parcel settings to archive.");
117 119
118 // Write out land data (aka parcel) settings 120 // Write out land data (aka parcel) settings
119 List<ILandObject>landObjects = m_scene.LandChannel.AllParcels(); 121 List<ILandObject>landObjects = m_scene.LandChannel.AllParcels();
@@ -124,7 +126,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
124 landData.GlobalID.ToString()); 126 landData.GlobalID.ToString());
125 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData)); 127 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData));
126 } 128 }
127 m_log.InfoFormat("[ARCHIVER]: Added parcel settings to archive."); 129
130 m_log.InfoFormat("[ARCHIVER]: Adding terrain information to archive.");
128 131
129 // Write out terrain 132 // Write out terrain
130 string terrainPath 133 string terrainPath
@@ -135,7 +138,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
135 m_archiveWriter.WriteFile(terrainPath, ms.ToArray()); 138 m_archiveWriter.WriteFile(terrainPath, ms.ToArray());
136 ms.Close(); 139 ms.Close();
137 140
138 m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); 141 m_log.InfoFormat("[ARCHIVER]: Adding scene objects to archive.");
139 142
140 // Write out scene object metadata 143 // Write out scene object metadata
141 foreach (SceneObjectGroup sceneObject in m_sceneObjects) 144 foreach (SceneObjectGroup sceneObject in m_sceneObjects)
@@ -145,10 +148,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
145 string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options); 148 string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options);
146 m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); 149 m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject);
147 } 150 }
148
149 m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive.");
150 } 151 }
151
152
153 } 152 }
154} 153} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index ffcf063..4d459bf 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -219,12 +219,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
219 m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); 219 m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
220 220
221 if (SaveAssets) 221 if (SaveAssets)
222 new AssetsRequest( 222 {
223 new AssetsArchiver(archiveWriter), assetUuids, 223 AssetsRequest ar
224 m_scene.AssetService, m_scene.UserAccountService, 224 = new AssetsRequest(
225 m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets).Execute(); 225 new AssetsArchiver(archiveWriter), assetUuids,
226 m_scene.AssetService, m_scene.UserAccountService,
227 m_scene.RegionInfo.ScopeID, options, awre.ReceivedAllAssets);
228
229 Util.FireAndForget(o => ar.Execute());
230 }
226 else 231 else
232 {
227 awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>()); 233 awre.ReceivedAllAssets(new List<UUID>(), new List<UUID>());
234 }
228 } 235 }
229 catch (Exception) 236 catch (Exception)
230 { 237 {
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 8e29e3c..55110dc 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -141,13 +141,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
141 PerformAssetsRequestCallback(null); 141 PerformAssetsRequestCallback(null);
142 return; 142 return;
143 } 143 }
144 144
145 m_requestCallbackTimer.Enabled = true;
146
145 foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids) 147 foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
146 { 148 {
147 m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); 149// m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
150 AssetBase asset = m_assetService.Get(kvp.Key.ToString());
151 PreAssetRequestCallback(kvp.Key.ToString(), kvp.Value, asset);
148 } 152 }
149
150 m_requestCallbackTimer.Enabled = true;
151 } 153 }
152 154
153 protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args) 155 protected void OnRequestCallbackTimeout(object source, ElapsedEventArgs args)
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index be0d56e..24b9e6b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -34,6 +34,9 @@ using OpenSim.Framework;
34using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.CoreModules.World.Estate; 36using OpenSim.Region.CoreModules.World.Estate;
37using log4net;
38using System.Reflection;
39using System.Xml;
37 40
38namespace OpenSim.Region.OptionalModules.World.NPC 41namespace OpenSim.Region.OptionalModules.World.NPC
39{ 42{
@@ -132,7 +135,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
132 135
133 public UUID GetDefaultAnimation(string name) 136 public UUID GetDefaultAnimation(string name)
134 { 137 {
135 return UUID.Zero; 138 return SLUtil.GetDefaultAvatarAnimation(name);
136 } 139 }
137 140
138 public Vector3 Position 141 public Vector3 Position
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index eb633b3..a142f26 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -712,7 +712,7 @@ namespace OpenSim.Region.RegionCombinerModule
712 712
713 List<Vector3> CoarseLocations = new List<Vector3>(); 713 List<Vector3> CoarseLocations = new List<Vector3>();
714 List<UUID> AvatarUUIDs = new List<UUID>(); 714 List<UUID> AvatarUUIDs = new List<UUID>();
715 715
716 connectiondata.RegionScene.ForEachRootScenePresence(delegate(ScenePresence sp) 716 connectiondata.RegionScene.ForEachRootScenePresence(delegate(ScenePresence sp)
717 { 717 {
718 if (sp.UUID != presence.UUID) 718 if (sp.UUID != presence.UUID)