From d131c5797818f33a02acc2c98b096d51935fc963 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 18:11:01 +0100 Subject: [PATCH 01/15] Update regression TestInventoryDescendentsFetch() to account for recent commit 1fa3a6f This was hidden in continuous integration because of another regression test issue. --- .../ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs index edc5016064..ee1ea1a548 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs @@ -152,7 +152,7 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests // A sanity check that the response has the expected number of descendents for a default inventory // TODO: Need a more thorough check. - Assert.That((int)folderOsd["descendents"], Is.EqualTo(14)); + Assert.That((int)folderOsd["descendents"], Is.EqualTo(16)); } } } \ No newline at end of file From bcaacb4e41f10f4ebadc25d4aef98d60fe970770 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 18:19:08 +0100 Subject: [PATCH 02/15] Temporarily print regression TestCastAndConcatString() script compile errors out to console to get a handle on what's going wrong. Does not fail for me locally and I failed to notice this test was failing on Jenkins. --- .../ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index badf82adc1..36474671e7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -166,10 +166,11 @@ default m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output); -// foreach (CompilerError compErr in m_compilerResults.Errors) -// { -// System.Console.WriteLine("Error: {0}", compErr); -// } + System.Console.WriteLine("ERRORS: {0}", m_compilerResults.Errors.Count); + foreach (CompilerError compErr in m_compilerResults.Errors) + { + System.Console.WriteLine("Error: {0}", compErr); + } Assert.AreEqual(0, m_compilerResults.Errors.Count); } From 394ec508f6b0b8c2731448d49cafedaaded273b7 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 18:37:16 +0100 Subject: [PATCH 03/15] Make CompilerTest add same AssemblyResolver as XEngine to see if this solves the issue with different AppDomain BaseDirectory in local and Jenkins test runs --- .../ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index 36474671e7..75b7244cd6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.IO; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -67,7 +68,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests m_CSCodeProvider = new CSharpCodeProvider(); m_compilerParameters = new CompilerParameters(); - string rootPath = Path.Combine(Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory)); + string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; + + System.AppDomain.CurrentDomain.AssemblyResolve += + new ResolveEventHandler( + AssemblyResolver.OnAssemblyResolve); + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); From 5622cf68aad44d710648e63e879e597fd12402f6 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 18:47:25 +0100 Subject: [PATCH 04/15] In compiler tests, remove the ResolveEventHandlers after test exit --- .../ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index 75b7244cd6..713b280497 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -49,6 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests private CSharpCodeProvider m_CSCodeProvider; private CompilerParameters m_compilerParameters; private CompilerResults m_compilerResults; + private ResolveEventHandler m_resolveEventHandler; /// /// Creates a temporary directory where build artifacts are stored. @@ -70,10 +71,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; - System.AppDomain.CurrentDomain.AssemblyResolve += - new ResolveEventHandler( - AssemblyResolver.OnAssemblyResolve); + m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); + System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); @@ -87,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests [TestFixtureTearDown] public void CleanUp() { + System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler; + if (Directory.Exists(m_testDir)) { // Blow away the temporary directory with artifacts. From 464d31b70bc870bd0945cb26c51dc1df48c2ec2a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 20:42:36 +0100 Subject: [PATCH 05/15] Stop appending redundant newline to console messages in Robust and pCampbot configs This is to fix an issue since recent commit fbcb763 where these are no longer removed automatically. OpenSim.*.config was already not appending these newlines --- bin/Robust.32BitLaunch.exe.config | 2 +- bin/Robust.exe.config | 2 +- bin/pCampBot.exe.config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/Robust.32BitLaunch.exe.config b/bin/Robust.32BitLaunch.exe.config index 95061e1938..0399a1bd34 100644 --- a/bin/Robust.32BitLaunch.exe.config +++ b/bin/Robust.32BitLaunch.exe.config @@ -17,7 +17,7 @@ - + diff --git a/bin/Robust.exe.config b/bin/Robust.exe.config index b9e01f1bc7..3a978b20d4 100644 --- a/bin/Robust.exe.config +++ b/bin/Robust.exe.config @@ -17,7 +17,7 @@ - + diff --git a/bin/pCampBot.exe.config b/bin/pCampBot.exe.config index 791299118b..89350b053d 100755 --- a/bin/pCampBot.exe.config +++ b/bin/pCampBot.exe.config @@ -11,7 +11,7 @@ - + From 9ca86664bb6cd09e2f619ab882aaca30c08dc379 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 23:15:50 +0100 Subject: [PATCH 06/15] Make RegionReady login disabled during initialization message a console messages instead of a warning message. Same justification as earlier commit 996a6c2. These are not warnings but should still be visible to the user at any log level. --- .../Scripting/RegionReadyModule/RegionReadyModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index d059b97516..870c0bbce9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs @@ -105,8 +105,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady m_scene.LoginLock = true; m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; - // Warn level because the region cannot be used while logins are disabled - m_log.WarnFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); + // This should always show up to the user but should not trigger warn/errors as these messages are + // expected and are not simulator problems. Ideally, there would be a status level in log4net but + // failing that, we will print out to console instead. + MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); if (m_uri != string.Empty) { From c32ccfb520cb979988c6bbdc195b0977cced3d06 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 23:18:33 +0100 Subject: [PATCH 07/15] minor: Comment out 2 error level debugging message in authentication code --- .../Handlers/Authentication/AuthenticationServerPostHandler.cs | 2 +- .../Authentication/AuthenticationServicesConnector.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs index e258ddecde..5d65f67b08 100644 --- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs @@ -74,7 +74,7 @@ namespace OpenSim.Server.Handlers.Authentication protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - m_log.Error("[XXX]: Authenticating..."); +// m_log.Error("[XXX]: Authenticating..."); string[] p = SplitParams(path); if (p.Length > 0) diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs index 56b6434273..c8a4912e8c 100644 --- a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs +++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs @@ -108,7 +108,7 @@ namespace OpenSim.Services.Connectors public bool Verify(UUID principalID, string token, int lifetime) { - m_log.Error("[XXX]: Verify"); +// m_log.Error("[XXX]: Verify"); Dictionary sendData = new Dictionary(); sendData["LIFETIME"] = lifetime.ToString(); sendData["PRINCIPAL"] = principalID.ToString(); From 27597463dacb539df76a55ce417959769cae5842 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 27 May 2014 23:40:29 +0100 Subject: [PATCH 08/15] Change Assembly verson of OpenSim.Data.PGSQL.dll to 0.8.0.* to match all other assembly versions --- OpenSim/Data/PGSQL/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Data/PGSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/PGSQL/Properties/AssemblyInfo.cs index 27d06790ea..d2096a8cab 100644 --- a/OpenSim/Data/PGSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/PGSQL/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly : AssemblyVersion("0.7.6.*")] +[assembly : AssemblyVersion("0.8.0.*")] From 1efaf0c85c382c4fb0875bdb6f92a1fc56221aed Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 30 May 2014 11:56:05 -0400 Subject: [PATCH 09/15] Add some info about xbuild command line switches to clean and select between producing Debug or Release binaries --- BUILDING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 5210b58f1f..d8deeeb237 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -19,10 +19,14 @@ Prereqs: From the distribution type: * ./runprebuild.sh - * nant (or xbuild) + * nant (or !* xbuild) * cd bin * copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include * run mono OpenSim.exe + !* xbuild option switches + !* clean: xbuild /target:clean + !* debug: (default) xbuild /property:Configuration=Debug + !* release: xbuild /property:Configuration=Release # Using Monodevelop From 8656b5e948b5865f431a6178992b2c0bd83899a3 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 30 May 2014 19:38:10 +0100 Subject: [PATCH 10/15] Fix bug where setting a parcel in a varregion for sale would make sale bitmap generation in WorldMapModule throw an exception on next startup. This commit replaces the hardcoded region sizes in WorldMapModule.GenerateOverlay() with numbers pulled from m_scene.RegionInfo --- OpenSim/Framework/RegionInfo.cs | 21 +++++++++++++ .../World/WorldMap/WorldMapModule.cs | 31 +++++++++++++------ 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index ce14b58a3e..7ac94a04e7 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -147,8 +147,29 @@ namespace OpenSim.Framework public uint WorldLocX = 0; public uint WorldLocY = 0; public uint WorldLocZ = 0; + + /// + /// X dimension of the region. + /// + /// + /// If this is a varregion then the default size set here will be replaced when we load the region config. + /// public uint RegionSizeX = Constants.RegionSize; + + /// + /// X dimension of the region. + /// + /// + /// If this is a varregion then the default size set here will be replaced when we load the region config. + /// public uint RegionSizeY = Constants.RegionSize; + + /// + /// Z dimension of the region. + /// + /// + /// XXX: Unknown if this accounts for regions with negative Z. + /// public uint RegionSizeZ = Constants.RegionHeight; private Dictionary m_extraSettings = new Dictionary(); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index b98afbcb3d..e4977cfdc0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -1578,12 +1578,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap private Byte[] GenerateOverlay() { - using (Bitmap overlay = new Bitmap(256, 256)) + // These need to be ints for bitmap generation + int regionSizeX = (int)m_scene.RegionInfo.RegionSizeX; + int regionSizeY = (int)m_scene.RegionInfo.RegionSizeY; + + int landTileSize = LandManagementModule.LandUnit; + int regionLandTilesX = regionSizeX / landTileSize; + int regionLandTilesY = regionSizeY / landTileSize; + + using (Bitmap overlay = new Bitmap(regionSizeX, regionSizeY)) { - bool[,] saleBitmap = new bool[64, 64]; - for (int x = 0 ; x < 64 ; x++) + bool[,] saleBitmap = new bool[regionLandTilesX, regionLandTilesY]; + for (int x = 0; x < regionLandTilesX; x++) { - for (int y = 0 ; y < 64 ; y++) + for (int y = 0; y < regionLandTilesY; y++) saleBitmap[x, y] = false; } @@ -1596,8 +1604,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap using (Graphics g = Graphics.FromImage(overlay)) { using (SolidBrush transparent = new SolidBrush(background)) - g.FillRectangle(transparent, 0, 0, 256, 256); - + g.FillRectangle(transparent, 0, 0, regionSizeX, regionSizeY); foreach (ILandObject land in parcels) { @@ -1620,12 +1627,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap using (SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9))) { - for (int x = 0 ; x < 64 ; x++) + for (int x = 0 ; x < regionLandTilesX ; x++) { - for (int y = 0 ; y < 64 ; y++) + for (int y = 0 ; y < regionLandTilesY ; y++) { if (saleBitmap[x, y]) - g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4); + g.FillRectangle( + yellow, x * landTileSize, + regionSizeX - landTileSize - (y * landTileSize), + landTileSize, + landTileSize); } } } @@ -1654,4 +1665,4 @@ namespace OpenSim.Region.CoreModules.World.WorldMap public uint itemtype; public ulong regionhandle; } -} +} \ No newline at end of file From 35c7fb203829c3618cfaa427d7026b93a5a67698 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 30 May 2014 19:45:05 +0100 Subject: [PATCH 11/15] minor: Comment out log line in Groups V2 GroupsServicePostHandler for now which logs every request it receives. --- OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs index 55ae6dbc20..52b9728ecc 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs @@ -109,7 +109,7 @@ namespace OpenSim.Groups string method = request["METHOD"].ToString(); request.Remove("METHOD"); - m_log.DebugFormat("[Groups.Handler]: {0}", method); +// m_log.DebugFormat("[Groups.Handler]: {0}", method); switch (method) { case "PUTGROUP": From 9ced61fbc26a977cb2b0aedecdc60fcd684f365e Mon Sep 17 00:00:00 2001 From: dahlia Date: Fri, 30 May 2014 13:47:19 -0700 Subject: [PATCH 12/15] Add a 0 parameter overload for RestClient.Request() for use when no auth is required. This preserves API compatibility for external modules using this function. --- OpenSim/Framework/Communications/RestClient.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 89e6aa1cce..586400f2e9 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -296,6 +296,14 @@ namespace OpenSim.Framework.Communications #endregion Async communications with server + /// + /// Perform a synchronous request + /// + public Stream Request() + { + return Request(null); + } + /// /// Perform a synchronous request /// From a755c57b440f153df8cb50674260f31e5b26c172 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 30 May 2014 22:04:59 +0100 Subject: [PATCH 13/15] Fix issue with BulletSim avatar level flight jitter by commenting out RawVelocity update threshold for now in BSCharacter.UpdateProperties(). For some reason as yet unidentified (feedback?) a threshold above 0.4 here causes the RawVelocity to move between a lower and upper bound rather than remaining constant. The RawVelocity increased until it triggered the threshold update, at which point it started to decrease until it again triggered the threshhold update. This delta-v was enough to exceed the checks in ScenePresence.SendTerseUpdateToAllClients() and produce jittery avatar flight because of the fluctuating velocity. With a threshold of 0.4 (or 0, as with ODE), the RawVelocity remains constant in BulletSim and so avatar flight becomes mostly smooth - remaining occasional glitches appear to be a result of errors in distance extraploation. There are no obvious problems with commenting out the threshold. Misterblue, if this is wrong or I've missed some subtlety here, please feel free to revert and/or correct. The same considerations may or may not apply to object velocity updates. --- OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index dfcd2bf43f..9b56fb432d 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -744,7 +744,18 @@ public sealed class BSCharacter : BSPhysObject // and will send agent updates to the clients if velocity changes by more than // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many // extra updates. - if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f)) + // + // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to + // avatar movement rather than removes it. The larger the threshold, the bigger the jitter. + // This is most noticeable in level flight and can be seen with + // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower + // bound and an upper bound, where the difference between the two is enough to trigger a large delta v update + // and subsequently trigger an update in ScenePresence.SendTerseUpdateToAllClients(). The cause of this cycle (feedback?) + // has not yet been identified. + // + // If there is a threshold below 0.4 or no threshold check at all (as in ODE), then RawVelocity stays constant and extra + // updates are not triggered in ScenePresence.SendTerseUpdateToAllClients(). +// if (!entprop.Velocity.ApproxEquals(RawVelocity, 0.1f)) RawVelocity = entprop.Velocity; _acceleration = entprop.Acceleration; From 3c992b028c17c22a25c3451181088c3236c09d63 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 30 May 2014 22:18:07 +0100 Subject: [PATCH 14/15] minor: Add some commented out logging to ScenePresence.SendTerseUpdateToAllClients() which is extremely helpful when investigating presence update triggers. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 17f54c2d79..90c95dacc3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3259,6 +3259,10 @@ namespace OpenSim.Region.Framework.Scenes float speed = Velocity.Length(); float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Delta-v {0}, lastVelocity {1}, Velocity {2} for {3} in {4}", +// velocidyDiff, lastVelocitySentToAllClients, Velocity, Name, Scene.Name); + // assuming 5 ms. worst case precision for timer, use 2x that // for distance error threshold float distanceErrorThreshold = speed * 0.01f; @@ -3267,6 +3271,10 @@ namespace OpenSim.Region.Framework.Scenes || Math.Abs(distanceError) > distanceErrorThreshold || velocidyDiff > 0.01f) // did velocity change from last update? { +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Update triggered with speed {0}, distanceError {1}, distanceThreshold {2}, delta-v {3} for {4} in {5}", +// speed, distanceError, distanceErrorThreshold, velocidyDiff, Name, Scene.Name); + lastVelocitySentToAllClients = Velocity; lastTerseUpdateToAllClientsTick = currentTick; lastPositionSentToAllClients = OffsetPosition; From bf5320eb26e5abdb64d04c118d1508666dd02513 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 30 May 2014 22:20:53 +0100 Subject: [PATCH 15/15] minor: rename velocidyDiff -> velocityDiff --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 90c95dacc3..37353c1e3b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3257,7 +3257,7 @@ namespace OpenSim.Region.Framework.Scenes float distanceError = Vector3.Distance(OffsetPosition, expectedPosition); float speed = Velocity.Length(); - float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); + float velocityDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); // m_log.DebugFormat( // "[SCENE PRESENCE]: Delta-v {0}, lastVelocity {1}, Velocity {2} for {3} in {4}", @@ -3269,7 +3269,7 @@ namespace OpenSim.Region.Framework.Scenes if (speed < 0.01f // allow rotation updates if avatar position is unchanged || Math.Abs(distanceError) > distanceErrorThreshold - || velocidyDiff > 0.01f) // did velocity change from last update? + || velocityDiff > 0.01f) // did velocity change from last update? { // m_log.DebugFormat( // "[SCENE PRESENCE]: Update triggered with speed {0}, distanceError {1}, distanceThreshold {2}, delta-v {3} for {4} in {5}",