From 1c758ae01c514df4742a9cdae6480e8011debf38 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:08:58 +0100 Subject: make default TextureOnMapTile true for the older map imager Don't know of a good reason not to do this, seems to work fine. --- bin/OpenSim.ini.example | 4 ++-- bin/OpenSimDefaults.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 60d37fb..b706926 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -68,9 +68,9 @@ ;; in a tag. ; regionload_webserver_url = "http://example.com/regions.xml"; - ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} false + ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} true ;; Use terrain texture for maptiles if true, use shaded green if false - ; TextureOnMapTile = false + ; TextureOnMapTile = true ;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false ;; Draw objects on maptile. This step might take a long time if you've diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 400d3df..ffb3063 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -71,7 +71,7 @@ ; objects, so you can turn it off here if you'd like. DrawPrimOnMapTile = true ; Use terrain texture for maptiles if true, use shaded green if false - TextureOnMapTile = false + TextureOnMapTile = true ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). NonPhysicalPrimMax = 256 -- cgit v1.1 From 69c2d3434a314b962deda9557b280718c22bab9c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:13:54 +0100 Subject: minor: remove the pointless quotes from the GenerateMaptiles option --- bin/OpenSim.ini.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index b706926..b21e3e2 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -190,7 +190,7 @@ ;; Map tile options. You can choose to generate no map tiles at all, ;; generate normal maptiles, or nominate an uploaded texture to ;; be the map tile - ; GenerateMaptiles = "true" + ; GenerateMaptiles = true ;; If desired, a running region can update the map tiles periodically ;; to reflect building activity. This names no sense of you don't have -- cgit v1.1 From d2d67a1abfe88e1f86e7edce279905602b8192cb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:14:43 +0100 Subject: remove pointless quotes from GenerateMaptiles option in OpenSimDefaults.ini --- bin/OpenSimDefaults.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index ffb3063..b6b4d6b 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -216,10 +216,13 @@ ;WorldMapModule = "WorldMap" ;MapImageModule = "MapImageModule" + ; Set to false to not generate any maptiles - ;GenerateMaptiles = "true" + ;GenerateMaptiles = true + ; Refresh (in seconds) the map tile periodically ;MaptileRefresh = 0 + ; If not generating maptiles, use this static texture asset ID ;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" -- cgit v1.1 From 0a09c45726a0115b34c34ecbfa5bf48dff501590 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:18:10 +0100 Subject: minor: group all the map tile options together --- bin/OpenSim.ini.example | 18 +++++++++--------- bin/OpenSimDefaults.ini | 13 +++++++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index b21e3e2..acad0f3 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -68,15 +68,6 @@ ;; in a tag. ; regionload_webserver_url = "http://example.com/regions.xml"; - ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} true - ;; Use terrain texture for maptiles if true, use shaded green if false - ; TextureOnMapTile = true - - ;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false - ;; Draw objects on maptile. This step might take a long time if you've - ;; got a large number of objects, so you can turn it off here if you'd like. - ; DrawPrimOnMapTile = true - ;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256 ;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). ; NonPhysicalPrimMax = 256 @@ -200,6 +191,15 @@ ;; If not generating maptiles, use this static texture asset ID ; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" + ;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} true + ;; Use terrain texture for maptiles if true, use shaded green if false + ; TextureOnMapTile = true + + ;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false + ;; Draw objects on maptile. This step might take a long time if you've + ;; got a large number of objects, so you can turn it off here if you'd like. + ; DrawPrimOnMapTile = true + ;; Http proxy setting for llHTTPRequest and dynamic texture loading, if required ; HttpProxy = "http://proxy.com:8080" diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index b6b4d6b..d1b3ae6 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -67,12 +67,6 @@ ; except that everything is also enclosed in a tag. ; regionload_webserver_url = "http://example.com/regions.xml"; - ; Draw objects on maptile. This step might take a long time if you've got a large number of - ; objects, so you can turn it off here if you'd like. - DrawPrimOnMapTile = true - ; Use terrain texture for maptiles if true, use shaded green if false - TextureOnMapTile = true - ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). NonPhysicalPrimMax = 256 @@ -226,6 +220,13 @@ ; If not generating maptiles, use this static texture asset ID ;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" + ; Draw objects on maptile. This step might take a long time if you've got a large number of + ; objects, so you can turn it off here if you'd like. + DrawPrimOnMapTile = true + + ; Use terrain texture for maptiles if true, use shaded green if false + TextureOnMapTile = true + ; ## ; ## EMAIL MODULE ; ## -- cgit v1.1 From e1ce1067902614df732422721b8806e978a36f5f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:21:19 +0100 Subject: make [SMTP] default comment option match actual default --- bin/OpenSim.ini.example | 2 +- bin/OpenSimDefaults.ini | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index acad0f3..2fe4db7 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -218,7 +218,7 @@ ;; The SMTP server enabled the email module to send email to external ;; destinations. - ;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} true + ;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} false ;; Enable sending email via SMTP ; enabled = false diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index d1b3ae6..bf36228 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -277,15 +277,15 @@ [SMTP] - enabled=false - - ;enabled=true - ;internal_object_host=lsl.opensim.local - ;host_domain_header_from=127.0.0.1 - ;SMTP_SERVER_HOSTNAME=127.0.0.1 - ;SMTP_SERVER_PORT=25 - ;SMTP_SERVER_LOGIN=foo - ;SMTP_SERVER_PASSWORD=bar + enabled = false + + ;enabled = true + ;internal_object_host = lsl.opensim.local + ;host_domain_header_from = 127.0.0.1 + ;SMTP_SERVER_HOSTNAME = 127.0.0.1 + ;SMTP_SERVER_PORT = 25 + ;SMTP_SERVER_LOGIN = foo + ;SMTP_SERVER_PASSWORD = bar [Network] -- cgit v1.1 From 630e11cbe1001d858a5af9aee0047f4a99af3b98 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:22:27 +0100 Subject: remove dead MXP default symbols. The MXP code is long, long gone. --- bin/MXP.pdb | Bin 382464 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bin/MXP.pdb diff --git a/bin/MXP.pdb b/bin/MXP.pdb deleted file mode 100644 index deadeef..0000000 Binary files a/bin/MXP.pdb and /dev/null differ -- cgit v1.1 From 6426492da04b48561a658382e8eba40c92cf4dd9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 21 Jul 2011 03:24:20 +0100 Subject: remove the windows debugging symbols for the long protobuf-net --- bin/protobuf-net.pdb | Bin 331264 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bin/protobuf-net.pdb diff --git a/bin/protobuf-net.pdb b/bin/protobuf-net.pdb deleted file mode 100644 index 9c85bdc..0000000 Binary files a/bin/protobuf-net.pdb and /dev/null differ -- cgit v1.1 From f97278610c2ab9717b32b9c64bc5865b0b47dd41 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 4 Jul 2011 17:54:14 +0300 Subject: Fixed updating avatar appearance Signed-off-by: root --- OpenSim/Framework/AvatarAppearance.cs | 4 +++- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 27 ++++++++++++++-------- 2 files changed, 20 insertions(+), 11 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 if (appearance.VisualParams != null) m_visualparams = (byte[])appearance.VisualParams.Clone(); + m_avatarHeight = appearance.m_avatarHeight; + m_hipOffset = appearance.m_hipOffset; + // Copy the attachment, force append mode since that ensures consistency m_attachments = new Dictionary>(); foreach (AvatarAttachment attachment in appearance.GetAttachments()) @@ -237,7 +240,6 @@ namespace OpenSim.Framework { m_serial = 0; - SetDefaultParams(); SetDefaultTexture(); //for (int i = 0; i < BAKE_INDICES.Length; i++) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 75dbeb8..9037c80 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 changed = sp.Appearance.SetVisualParams(visualParams); if (sp.Appearance.AvatarHeight > 0) sp.SetHeight(sp.Appearance.AvatarHeight); - } + } // Process the baked texture array if (textureEntry != null) @@ -387,11 +387,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId); // we need to clean out the existing textures - sp.Appearance.ResetAppearance(); + sp.Appearance.ResetAppearance(); - // operate on a copy of the appearance so we don't have to lock anything + // operate on a copy of the appearance so we don't have to lock anything yet AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); - + foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { if (wear.Type < AvatarWearable.MAX_WEARABLES) @@ -403,12 +403,19 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // This could take awhile since it needs to pull inventory SetAppearanceAssets(sp.UUID, ref avatAppearance); - // could get fancier with the locks here, but in the spirit of "last write wins" - // this should work correctly, also, we don't need to send the appearance here - // since the "iswearing" will trigger a new set of visual param and baked texture changes - // when those complete, the new appearance will be sent - sp.Appearance = avatAppearance; - QueueAppearanceSave(client.AgentId); + lock (m_setAppearanceLock) + { + // Update only those fields that we have changed. This is important because the viewer + // often sends AvatarIsWearing and SetAppearance packets at once, and AvatarIsWearing + // shouldn't overwrite the changes made in SetAppearance. + sp.Appearance.Wearables = avatAppearance.Wearables; + sp.Appearance.Texture = avatAppearance.Texture; + + // We don't need to send the appearance here since the "iswearing" will trigger a new set + // of visual param and baked texture changes. When those complete, the new appearance will be sent + + QueueAppearanceSave(client.AgentId); + } } private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) -- cgit v1.1 From 56830bfe07234b0f4b48737a921cc6eae68d9a39 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 12 Jul 2011 12:56:34 +0300 Subject: When handling SetAppearance packet, always save the appearance; not only if the texture was changed --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 9037c80..995a552 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -224,12 +224,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // update transaction. In theory, we should be able to do an immediate // appearance send and save here. - // save only if there were changes, send no matter what (doesn't hurt to send twice) - if (changed) - QueueAppearanceSave(client.AgentId); - - QueueAppearanceSend(client.AgentId); } + // save only if there were changes, send no matter what (doesn't hurt to send twice) + if (changed) + QueueAppearanceSave(client.AgentId); + + QueueAppearanceSend(client.AgentId); } // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); -- cgit v1.1 From 71ef4a8fb3f582ee76ceb1ec613b32ad2e4bc058 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 18 Jul 2011 12:32:32 +0300 Subject: When an uncached asset is requested multiple times concurrently, only load it once Signed-off-by: root --- .../Connectors/Asset/AssetServiceConnector.cs | 58 ++++++++++++++++++---- 1 file changed, 49 insertions(+), 9 deletions(-) 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 private string m_ServerURI = String.Empty; private IImprovedAssetCache m_Cache = null; + private delegate void AssetRetrievedEx(AssetBase asset); + + // Keeps track of concurrent requests for the same asset, so that it's only loaded once. + // Maps: Asset ID -> Handlers which will be called when the asset has been loaded + private Dictionary m_AssetHandlers = new Dictionary(); + + public AssetServicesConnector() { } @@ -178,23 +185,56 @@ namespace OpenSim.Services.Connectors if (asset == null) { - bool result = false; - - AsynchronousRestObjectRequester. - MakeRequest("GET", uri, 0, + lock (m_AssetHandlers) + { + AssetRetrievedEx handlerEx = new AssetRetrievedEx(delegate(AssetBase _asset) { handler(id, sender, _asset); }); + + AssetRetrievedEx handlers; + if (m_AssetHandlers.TryGetValue(id, out handlers)) + { + // Someone else is already loading this asset. It will notify our handler when done. + handlers += handlerEx; + return true; + } + + // Load the asset ourselves + handlers += handlerEx; + m_AssetHandlers.Add(id, handlers); + } + + bool success = false; + try + { + AsynchronousRestObjectRequester.MakeRequest("GET", uri, 0, delegate(AssetBase a) { if (m_Cache != null) m_Cache.Cache(a); - handler(id, sender, a); - result = true; - }); - return result; + AssetRetrievedEx handlers; + lock (m_AssetHandlers) + { + handlers = m_AssetHandlers[id]; + m_AssetHandlers.Remove(id); + } + handlers.Invoke(a); + }); + + success = true; + } + finally + { + if (!success) + { + lock (m_AssetHandlers) + { + m_AssetHandlers.Remove(id); + } + } + } } else { - //Util.FireAndForget(delegate { handler(id, sender, asset); }); handler(id, sender, asset); } -- cgit v1.1 From 02e54c57c4901167779f07ed3e89fb1d24ffc22a Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 22 Jul 2011 11:33:00 +0300 Subject: Generate the initial maptile asynchronously Signed-off-by: Melanie --- .../CoreModules/World/WorldMap/WorldMapModule.cs | 10 ++++++---- OpenSim/Region/Framework/Scenes/Scene.cs | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) 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 if (data == null) return; - UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; - m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); - m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); + UUID terrainImageID = UUID.Random(); AssetBase asset = new AssetBase( - m_scene.RegionInfo.RegionSettings.TerrainImageID, + terrainImageID, "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID.ToString()); @@ -1129,6 +1127,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap // Store the new one m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); m_scene.AssetService.Store(asset); + + // Switch to the new one + UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; + m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; m_scene.RegionInfo.RegionSettings.Save(); // 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 m_sceneGridService.SetScene(this); - // If we generate maptiles internally at all, the maptile generator - // will register the region. If not, do it here - if (m_generateMaptiles) + GridRegion region = new GridRegion(RegionInfo); + string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); + if (error != String.Empty) { - RegenerateMaptile(null, null); + throw new Exception(error); } - else + + // Generate the maptile asynchronously, because sometimes it can be very slow and we + // don't want this to delay starting the region. + if (m_generateMaptiles) { - GridRegion region = new GridRegion(RegionInfo); - string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); - if (error != String.Empty) - { - throw new Exception(error); - } + Util.FireAndForget(delegate { + RegenerateMaptile(null, null); + }); } } -- cgit v1.1 From 6ac0bc72592b5fe338c98d3acfc973faed321d14 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 22 Jul 2011 12:36:05 +0100 Subject: Thank you, Michelle Argus, for a patch that adds reading the agent limit from XML properly. --- OpenSim/Framework/RegionInfo.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 "Clamp prims to max size", "false", true); configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, - "Max objects this sim will hold", "0", true); + "Max objects this sim will hold", "15000", true); + + configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, + "Max avatars this sim will hold", "100", true); configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", UUID.Zero.ToString(), true); -- cgit v1.1