aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs4
-rw-r--r--OpenSim/Framework/RegionInfo.cs5
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs37
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs22
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs58
-rw-r--r--bin/MXP.pdbbin382464 -> 0 bytes
-rw-r--r--bin/OpenSim.ini.example22
-rw-r--r--bin/OpenSimDefaults.ini36
-rw-r--r--bin/protobuf-net.pdbbin331264 -> 0 bytes
10 files changed, 126 insertions, 68 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 5a6b265..716baab 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -196,6 +196,9 @@ namespace OpenSim.Framework
196 if (appearance.VisualParams != null) 196 if (appearance.VisualParams != null)
197 m_visualparams = (byte[])appearance.VisualParams.Clone(); 197 m_visualparams = (byte[])appearance.VisualParams.Clone();
198 198
199 m_avatarHeight = appearance.m_avatarHeight;
200 m_hipOffset = appearance.m_hipOffset;
201
199 // Copy the attachment, force append mode since that ensures consistency 202 // Copy the attachment, force append mode since that ensures consistency
200 m_attachments = new Dictionary<int, List<AvatarAttachment>>(); 203 m_attachments = new Dictionary<int, List<AvatarAttachment>>();
201 foreach (AvatarAttachment attachment in appearance.GetAttachments()) 204 foreach (AvatarAttachment attachment in appearance.GetAttachments())
@@ -237,7 +240,6 @@ namespace OpenSim.Framework
237 { 240 {
238 m_serial = 0; 241 m_serial = 0;
239 242
240 SetDefaultParams();
241 SetDefaultTexture(); 243 SetDefaultTexture();
242 244
243 //for (int i = 0; i < BAKE_INDICES.Length; i++) 245 //for (int i = 0; i < BAKE_INDICES.Length; i++)
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 4c007d6..0e41535 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -760,7 +760,10 @@ namespace OpenSim.Framework
760 "Clamp prims to max size", "false", true); 760 "Clamp prims to max size", "false", true);
761 761
762 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 762 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
763 "Max objects this sim will hold", "0", true); 763 "Max objects this sim will hold", "15000", true);
764
765 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
766 "Max avatars this sim will hold", "100", true);
764 767
765 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, 768 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
766 "Scope ID for this region", UUID.Zero.ToString(), true); 769 "Scope ID for this region", UUID.Zero.ToString(), true);
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 75dbeb8..995a552 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
210 changed = sp.Appearance.SetVisualParams(visualParams); 210 changed = sp.Appearance.SetVisualParams(visualParams);
211 if (sp.Appearance.AvatarHeight > 0) 211 if (sp.Appearance.AvatarHeight > 0)
212 sp.SetHeight(sp.Appearance.AvatarHeight); 212 sp.SetHeight(sp.Appearance.AvatarHeight);
213 } 213 }
214 214
215 // Process the baked texture array 215 // Process the baked texture array
216 if (textureEntry != null) 216 if (textureEntry != null)
@@ -224,12 +224,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
224 // update transaction. In theory, we should be able to do an immediate 224 // update transaction. In theory, we should be able to do an immediate
225 // appearance send and save here. 225 // appearance send and save here.
226 226
227 // save only if there were changes, send no matter what (doesn't hurt to send twice)
228 if (changed)
229 QueueAppearanceSave(client.AgentId);
230
231 QueueAppearanceSend(client.AgentId);
232 } 227 }
228 // save only if there were changes, send no matter what (doesn't hurt to send twice)
229 if (changed)
230 QueueAppearanceSave(client.AgentId);
231
232 QueueAppearanceSend(client.AgentId);
233 } 233 }
234 234
235 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); 235 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString());
@@ -387,11 +387,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
387 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId); 387 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId);
388 388
389 // we need to clean out the existing textures 389 // we need to clean out the existing textures
390 sp.Appearance.ResetAppearance(); 390 sp.Appearance.ResetAppearance();
391 391
392 // operate on a copy of the appearance so we don't have to lock anything 392 // operate on a copy of the appearance so we don't have to lock anything yet
393 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); 393 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
394 394
395 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 395 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
396 { 396 {
397 if (wear.Type < AvatarWearable.MAX_WEARABLES) 397 if (wear.Type < AvatarWearable.MAX_WEARABLES)
@@ -403,12 +403,19 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
403 // This could take awhile since it needs to pull inventory 403 // This could take awhile since it needs to pull inventory
404 SetAppearanceAssets(sp.UUID, ref avatAppearance); 404 SetAppearanceAssets(sp.UUID, ref avatAppearance);
405 405
406 // could get fancier with the locks here, but in the spirit of "last write wins" 406 lock (m_setAppearanceLock)
407 // this should work correctly, also, we don't need to send the appearance here 407 {
408 // since the "iswearing" will trigger a new set of visual param and baked texture changes 408 // Update only those fields that we have changed. This is important because the viewer
409 // when those complete, the new appearance will be sent 409 // often sends AvatarIsWearing and SetAppearance packets at once, and AvatarIsWearing
410 sp.Appearance = avatAppearance; 410 // shouldn't overwrite the changes made in SetAppearance.
411 QueueAppearanceSave(client.AgentId); 411 sp.Appearance.Wearables = avatAppearance.Wearables;
412 sp.Appearance.Texture = avatAppearance.Texture;
413
414 // We don't need to send the appearance here since the "iswearing" will trigger a new set
415 // of visual param and baked texture changes. When those complete, the new appearance will be sent
416
417 QueueAppearanceSave(client.AgentId);
418 }
412 } 419 }
413 420
414 private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) 421 private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance)
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 6e142bb..fac2dab 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1110,14 +1110,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1110 if (data == null) 1110 if (data == null)
1111 return; 1111 return;
1112 1112
1113 UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
1114
1115 m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); 1113 m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
1116 1114
1117 m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); 1115 UUID terrainImageID = UUID.Random();
1118 1116
1119 AssetBase asset = new AssetBase( 1117 AssetBase asset = new AssetBase(
1120 m_scene.RegionInfo.RegionSettings.TerrainImageID, 1118 terrainImageID,
1121 "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), 1119 "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(),
1122 (sbyte)AssetType.Texture, 1120 (sbyte)AssetType.Texture,
1123 m_scene.RegionInfo.RegionID.ToString()); 1121 m_scene.RegionInfo.RegionID.ToString());
@@ -1129,6 +1127,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1129 // Store the new one 1127 // Store the new one
1130 m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); 1128 m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
1131 m_scene.AssetService.Store(asset); 1129 m_scene.AssetService.Store(asset);
1130
1131 // Switch to the new one
1132 UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
1133 m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID;
1132 m_scene.RegionInfo.RegionSettings.Save(); 1134 m_scene.RegionInfo.RegionSettings.Save();
1133 1135
1134 // Delete the old one 1136 // Delete the old one
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6e66632..32a2887 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1672,20 +1672,20 @@ namespace OpenSim.Region.Framework.Scenes
1672 1672
1673 m_sceneGridService.SetScene(this); 1673 m_sceneGridService.SetScene(this);
1674 1674
1675 // If we generate maptiles internally at all, the maptile generator 1675 GridRegion region = new GridRegion(RegionInfo);
1676 // will register the region. If not, do it here 1676 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
1677 if (m_generateMaptiles) 1677 if (error != String.Empty)
1678 { 1678 {
1679 RegenerateMaptile(null, null); 1679 throw new Exception(error);
1680 } 1680 }
1681 else 1681
1682 // Generate the maptile asynchronously, because sometimes it can be very slow and we
1683 // don't want this to delay starting the region.
1684 if (m_generateMaptiles)
1682 { 1685 {
1683 GridRegion region = new GridRegion(RegionInfo); 1686 Util.FireAndForget(delegate {
1684 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 1687 RegenerateMaptile(null, null);
1685 if (error != String.Empty) 1688 });
1686 {
1687 throw new Exception(error);
1688 }
1689 } 1689 }
1690 } 1690 }
1691 1691
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index f1da4fa..fdab254 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -48,6 +48,13 @@ namespace OpenSim.Services.Connectors
48 private string m_ServerURI = String.Empty; 48 private string m_ServerURI = String.Empty;
49 private IImprovedAssetCache m_Cache = null; 49 private IImprovedAssetCache m_Cache = null;
50 50
51 private delegate void AssetRetrievedEx(AssetBase asset);
52
53 // Keeps track of concurrent requests for the same asset, so that it's only loaded once.
54 // Maps: Asset ID -> Handlers which will be called when the asset has been loaded
55 private Dictionary<string, AssetRetrievedEx> m_AssetHandlers = new Dictionary<string, AssetRetrievedEx>();
56
57
51 public AssetServicesConnector() 58 public AssetServicesConnector()
52 { 59 {
53 } 60 }
@@ -178,23 +185,56 @@ namespace OpenSim.Services.Connectors
178 185
179 if (asset == null) 186 if (asset == null)
180 { 187 {
181 bool result = false; 188 lock (m_AssetHandlers)
182 189 {
183 AsynchronousRestObjectRequester. 190 AssetRetrievedEx handlerEx = new AssetRetrievedEx(delegate(AssetBase _asset) { handler(id, sender, _asset); });
184 MakeRequest<int, AssetBase>("GET", uri, 0, 191
192 AssetRetrievedEx handlers;
193 if (m_AssetHandlers.TryGetValue(id, out handlers))
194 {
195 // Someone else is already loading this asset. It will notify our handler when done.
196 handlers += handlerEx;
197 return true;
198 }
199
200 // Load the asset ourselves
201 handlers += handlerEx;
202 m_AssetHandlers.Add(id, handlers);
203 }
204
205 bool success = false;
206 try
207 {
208 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
185 delegate(AssetBase a) 209 delegate(AssetBase a)
186 { 210 {
187 if (m_Cache != null) 211 if (m_Cache != null)
188 m_Cache.Cache(a); 212 m_Cache.Cache(a);
189 handler(id, sender, a);
190 result = true;
191 });
192 213
193 return result; 214 AssetRetrievedEx handlers;
215 lock (m_AssetHandlers)
216 {
217 handlers = m_AssetHandlers[id];
218 m_AssetHandlers.Remove(id);
219 }
220 handlers.Invoke(a);
221 });
222
223 success = true;
224 }
225 finally
226 {
227 if (!success)
228 {
229 lock (m_AssetHandlers)
230 {
231 m_AssetHandlers.Remove(id);
232 }
233 }
234 }
194 } 235 }
195 else 236 else
196 { 237 {
197 //Util.FireAndForget(delegate { handler(id, sender, asset); });
198 handler(id, sender, asset); 238 handler(id, sender, asset);
199 } 239 }
200 240
diff --git a/bin/MXP.pdb b/bin/MXP.pdb
deleted file mode 100644
index deadeef..0000000
--- a/bin/MXP.pdb
+++ /dev/null
Binary files differ
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 60d37fb..2fe4db7 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -68,15 +68,6 @@
68 ;; in a <Regions> tag. 68 ;; in a <Regions> tag.
69 ; regionload_webserver_url = "http://example.com/regions.xml"; 69 ; regionload_webserver_url = "http://example.com/regions.xml";
70 70
71 ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} false
72 ;; Use terrain texture for maptiles if true, use shaded green if false
73 ; TextureOnMapTile = false
74
75 ;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false
76 ;; Draw objects on maptile. This step might take a long time if you've
77 ;; got a large number of objects, so you can turn it off here if you'd like.
78 ; DrawPrimOnMapTile = true
79
80 ;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256 71 ;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256
81 ;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). 72 ;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
82 ; NonPhysicalPrimMax = 256 73 ; NonPhysicalPrimMax = 256
@@ -190,7 +181,7 @@
190 ;; Map tile options. You can choose to generate no map tiles at all, 181 ;; Map tile options. You can choose to generate no map tiles at all,
191 ;; generate normal maptiles, or nominate an uploaded texture to 182 ;; generate normal maptiles, or nominate an uploaded texture to
192 ;; be the map tile 183 ;; be the map tile
193 ; GenerateMaptiles = "true" 184 ; GenerateMaptiles = true
194 185
195 ;; If desired, a running region can update the map tiles periodically 186 ;; If desired, a running region can update the map tiles periodically
196 ;; to reflect building activity. This names no sense of you don't have 187 ;; to reflect building activity. This names no sense of you don't have
@@ -200,6 +191,15 @@
200 ;; If not generating maptiles, use this static texture asset ID 191 ;; If not generating maptiles, use this static texture asset ID
201 ; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" 192 ; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
202 193
194 ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} true
195 ;; Use terrain texture for maptiles if true, use shaded green if false
196 ; TextureOnMapTile = true
197
198 ;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false
199 ;; Draw objects on maptile. This step might take a long time if you've
200 ;; got a large number of objects, so you can turn it off here if you'd like.
201 ; DrawPrimOnMapTile = true
202
203 ;; Http proxy setting for llHTTPRequest and dynamic texture loading, if required 203 ;; Http proxy setting for llHTTPRequest and dynamic texture loading, if required
204 ; HttpProxy = "http://proxy.com:8080" 204 ; HttpProxy = "http://proxy.com:8080"
205 205
@@ -218,7 +218,7 @@
218 ;; The SMTP server enabled the email module to send email to external 218 ;; The SMTP server enabled the email module to send email to external
219 ;; destinations. 219 ;; destinations.
220 220
221 ;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} true 221 ;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} false
222 ;; Enable sending email via SMTP 222 ;; Enable sending email via SMTP
223 ; enabled = false 223 ; enabled = false
224 224
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 400d3df..bf36228 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -67,12 +67,6 @@
67 ; except that everything is also enclosed in a <Regions> tag. 67 ; except that everything is also enclosed in a <Regions> tag.
68 ; regionload_webserver_url = "http://example.com/regions.xml"; 68 ; regionload_webserver_url = "http://example.com/regions.xml";
69 69
70 ; Draw objects on maptile. This step might take a long time if you've got a large number of
71 ; objects, so you can turn it off here if you'd like.
72 DrawPrimOnMapTile = true
73 ; Use terrain texture for maptiles if true, use shaded green if false
74 TextureOnMapTile = false
75
76 ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). 70 ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
77 NonPhysicalPrimMax = 256 71 NonPhysicalPrimMax = 256
78 72
@@ -216,13 +210,23 @@
216 210
217 ;WorldMapModule = "WorldMap" 211 ;WorldMapModule = "WorldMap"
218 ;MapImageModule = "MapImageModule" 212 ;MapImageModule = "MapImageModule"
213
219 ; Set to false to not generate any maptiles 214 ; Set to false to not generate any maptiles
220 ;GenerateMaptiles = "true" 215 ;GenerateMaptiles = true
216
221 ; Refresh (in seconds) the map tile periodically 217 ; Refresh (in seconds) the map tile periodically
222 ;MaptileRefresh = 0 218 ;MaptileRefresh = 0
219
223 ; If not generating maptiles, use this static texture asset ID 220 ; If not generating maptiles, use this static texture asset ID
224 ;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" 221 ;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
225 222
223 ; Draw objects on maptile. This step might take a long time if you've got a large number of
224 ; objects, so you can turn it off here if you'd like.
225 DrawPrimOnMapTile = true
226
227 ; Use terrain texture for maptiles if true, use shaded green if false
228 TextureOnMapTile = true
229
226 ; ## 230 ; ##
227 ; ## EMAIL MODULE 231 ; ## EMAIL MODULE
228 ; ## 232 ; ##
@@ -273,15 +277,15 @@
273 277
274 278
275[SMTP] 279[SMTP]
276 enabled=false 280 enabled = false
277 281
278 ;enabled=true 282 ;enabled = true
279 ;internal_object_host=lsl.opensim.local 283 ;internal_object_host = lsl.opensim.local
280 ;host_domain_header_from=127.0.0.1 284 ;host_domain_header_from = 127.0.0.1
281 ;SMTP_SERVER_HOSTNAME=127.0.0.1 285 ;SMTP_SERVER_HOSTNAME = 127.0.0.1
282 ;SMTP_SERVER_PORT=25 286 ;SMTP_SERVER_PORT = 25
283 ;SMTP_SERVER_LOGIN=foo 287 ;SMTP_SERVER_LOGIN = foo
284 ;SMTP_SERVER_PASSWORD=bar 288 ;SMTP_SERVER_PASSWORD = bar
285 289
286 290
287[Network] 291[Network]
diff --git a/bin/protobuf-net.pdb b/bin/protobuf-net.pdb
deleted file mode 100644
index 9c85bdc..0000000
--- a/bin/protobuf-net.pdb
+++ /dev/null
Binary files differ