From fb557879f7dc83ed3cb151d9de604354eb2f8da8 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 16 Jul 2008 16:26:57 +0000 Subject: [PATCH] * Renaming Settings.CONTINUOUS_AGENT_UPDATES to Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK. Lengthy name, but you only need to set it once and the new name describes what the flag actually does * Hacking out some initial skybox code in primpreview git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1917 52acb1d6-8a22-11de-b505-999d5b087335 --- SLImageUpload/frmSLImageUpload.cs | 1 - importprimscript/importprimscript.cs | 9 ++++++++- libsecondlife/AgentManagerMovement.cs | 4 ++-- libsecondlife/AssemblyInfo.cs | 12 ++++++------ libsecondlife/Helpers.cs | 2 +- libsecondlife/InternalDictionary.cs | 2 +- libsecondlife/Settings.cs | 19 +++++++++++++++++-- libsecondlife/libsecondlife.sln | 8 ++++++++ 8 files changed, 43 insertions(+), 14 deletions(-) diff --git a/SLImageUpload/frmSLImageUpload.cs b/SLImageUpload/frmSLImageUpload.cs index 33b96511..ed20d638 100644 --- a/SLImageUpload/frmSLImageUpload.cs +++ b/SLImageUpload/frmSLImageUpload.cs @@ -37,7 +37,6 @@ namespace SLImageUpload Client.Settings.ALWAYS_DECODE_OBJECTS = false; Client.Settings.ALWAYS_REQUEST_OBJECTS = false; Client.Settings.SEND_AGENT_UPDATES = true; - Client.Settings.CONTINUOUS_AGENT_UPDATES = false; Client.Settings.OBJECT_TRACKING = false; Client.Settings.STORE_LAND_PATCHES = false; Client.Settings.MULTIPLE_SIMS = false; diff --git a/importprimscript/importprimscript.cs b/importprimscript/importprimscript.cs index f9d7dc13..6e9b1a57 100644 --- a/importprimscript/importprimscript.cs +++ b/importprimscript/importprimscript.cs @@ -64,12 +64,13 @@ namespace importprimscript // Add callback handlers for asset uploads finishing. new prims spotted, and logging Client.Objects.OnNewPrim += new ObjectManager.NewPrimCallback(Objects_OnNewPrim); + Logger.OnLogMessage += new Logger.LogCallback(Client_OnLogMessage); // Optimize the connection for our purposes Client.Self.Movement.Camera.Far = 64f; Client.Settings.MULTIPLE_SIMS = false; Client.Settings.SEND_AGENT_UPDATES = true; - Client.Settings.CONTINUOUS_AGENT_UPDATES = true; + Client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true; Settings.LOG_LEVEL = Helpers.LogLevel.None; Client.Settings.ALWAYS_REQUEST_OBJECTS = true; Client.Settings.ALWAYS_DECODE_OBJECTS = true; @@ -189,6 +190,12 @@ namespace importprimscript Client.Network.Logout(); } + static void Client_OnLogMessage(object message, Helpers.LogLevel level) + { + if (level >= Helpers.LogLevel.Warning) + Console.WriteLine(level + ": " + message); + } + static LLUUID UploadImage(string filename, bool lossless) { LLUUID newAssetID = LLUUID.Zero; diff --git a/libsecondlife/AgentManagerMovement.cs b/libsecondlife/AgentManagerMovement.cs index 18fcb9b1..23a806ad 100644 --- a/libsecondlife/AgentManagerMovement.cs +++ b/libsecondlife/AgentManagerMovement.cs @@ -622,9 +622,9 @@ namespace libsecondlife duplicateCount = 0; } - if (Client.Settings.CONTINUOUS_AGENT_UPDATES || duplicateCount < 10) + if (Client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK || duplicateCount < 10) { - // Store the current state to do duplicate checking in the future + // Store the current state to do duplicate checking LastHeadRotation = HeadRotation; LastBodyRotation = BodyRotation; LastCameraYAxis = yAxis; diff --git a/libsecondlife/AssemblyInfo.cs b/libsecondlife/AssemblyInfo.cs index 18acf601..01e254a7 100644 --- a/libsecondlife/AssemblyInfo.cs +++ b/libsecondlife/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.CompilerServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("libsecondlife")] -[assembly: AssemblyDescription("Networking layer for the Second Life world")] +[assembly: AssemblyTitle("libopenmv")] +[assembly: AssemblyDescription("Open metaverse networking layer")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("libsecondlife")] -[assembly: AssemblyProduct("libsecondlife")] -[assembly: AssemblyCopyright("Copyright © libsecondlife 2006")] +[assembly: AssemblyCompany("libopenmv")] +[assembly: AssemblyProduct("libopenmv")] +[assembly: AssemblyCopyright("Copyright © libopenmv 2006-2008")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -25,7 +25,7 @@ using System.Runtime.CompilerServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.9.0.0")] +[assembly: AssemblyVersion("1.0.0.0")] // // In order to sign your assembly you must specify a key to use. Refer to the diff --git a/libsecondlife/Helpers.cs b/libsecondlife/Helpers.cs index 24359217..e03c4f19 100644 --- a/libsecondlife/Helpers.cs +++ b/libsecondlife/Helpers.cs @@ -1109,7 +1109,7 @@ namespace libsecondlife System.IO.Path.Combine(System.IO.Path.Combine(System.Environment.CurrentDirectory, searchPath), resourceName), System.IO.FileMode.Open); } - catch (Exception ex) + catch (Exception) { // Failed to load the resource from the given path } diff --git a/libsecondlife/InternalDictionary.cs b/libsecondlife/InternalDictionary.cs index d304c787..5ddf6238 100644 --- a/libsecondlife/InternalDictionary.cs +++ b/libsecondlife/InternalDictionary.cs @@ -41,6 +41,7 @@ namespace libsecondlife public class InternalDictionary { internal Dictionary Dictionary; + /// /// Gets the number of Key/Value pairs contained in the /// @@ -124,7 +125,6 @@ namespace libsecondlife return Dictionary.TryGetValue(key, out value); } - /// /// Finds the specified match. /// diff --git a/libsecondlife/Settings.cs b/libsecondlife/Settings.cs index 8f3491d8..8ef80a94 100644 --- a/libsecondlife/Settings.cs +++ b/libsecondlife/Settings.cs @@ -108,6 +108,8 @@ namespace libsecondlife #endregion #region Sizes + private int max_pending_acks = 10; + /// The initial size of the packet inbox, where packets are /// stored before processing public const int PACKET_INBOX_SIZE = 100; @@ -121,7 +123,20 @@ namespace libsecondlife public const int PACKET_ARCHIVE_SIZE = 200; /// Maximum number of queued ACKs to be sent before SendAcks() /// is forced - public int MAX_PENDING_ACKS = 10; + public int MAX_PENDING_ACKS + { + get { return max_pending_acks; } + set + { + // We can't safely fit more than 375 ACKs in 1500 bytes + if (value > 375) + throw new ArgumentOutOfRangeException("Too many ACKs to fit in a single packet"); + else if (value < 1) + throw new ArgumentOutOfRangeException("Cannot send a non-positive number of ACKs"); + + max_pending_acks = value; + } + } /// Maximum number of ACKs to append to a packet public int MAX_APPENDED_ACKS = 10; /// Network stats queue length (seconds) @@ -194,7 +209,7 @@ namespace libsecondlife /// If true, and SEND_AGENT_UPDATES is true, /// AgentUpdate packets will continuously be sent out to give the bot /// smoother movement and autopiloting - public bool CONTINUOUS_AGENT_UPDATES = true; + public bool DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true; /// If true, currently visible avatars will be stored /// in dictionaries inside Simulator.ObjectAvatars. diff --git a/libsecondlife/libsecondlife.sln b/libsecondlife/libsecondlife.sln index 7b16ab59..bea3c469 100644 --- a/libsecondlife/libsecondlife.sln +++ b/libsecondlife/libsecondlife.sln @@ -50,6 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Documentation", "..\docs\Do {D9CDEDFB-8169-4B03-B57F-0DF638F044EC} = {D9CDEDFB-8169-4B03-B57F-0DF638F044EC} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PathFinder", "examples\PathFinder\PathFinder.csproj", "{4917D836-C628-49C7-9E52-0300DBFC80C0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -186,6 +188,12 @@ Global {19DE5831-C10D-4013-A054-92E7F10EC115}.Release|Any CPU.ActiveCfg = Release|Any CPU {19DE5831-C10D-4013-A054-92E7F10EC115}.Release-docs|Any CPU.ActiveCfg = Release-docs|Any CPU {19DE5831-C10D-4013-A054-92E7F10EC115}.Release-docs|Any CPU.Build.0 = Release-docs|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Release|Any CPU.Build.0 = Release|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Release-docs|Any CPU.ActiveCfg = Release|Any CPU + {4917D836-C628-49C7-9E52-0300DBFC80C0}.Release-docs|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE