From 3ef7649a812bd831d2a85c1a049c8e4dc9385672 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 15 Sep 2008 23:37:35 +0000 Subject: [PATCH] * Defaulting AgentManager.Movement.AutoResetControls to false since most non-interactive bots will expect this behavior. May break a few bots that expect movement flags to be reset every update! * Fixed a crashing typo in TestClient ScriptCommand git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2225 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse/AgentManagerMovement.cs | 8 +++----- Programs/examples/TestClient/Commands/ScriptCommand.cs | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenMetaverse/AgentManagerMovement.cs b/OpenMetaverse/AgentManagerMovement.cs index 2b4f7f29..b3927fc8 100644 --- a/OpenMetaverse/AgentManagerMovement.cs +++ b/OpenMetaverse/AgentManagerMovement.cs @@ -380,11 +380,9 @@ namespace OpenMetaverse /// The current value of the agent control flags public uint AgentControls { - get - { - return agentControls; - } + get { return agentControls; } } + /// Gets or sets the interval in milliseconds at which /// AgentUpdate packets are sent to the current simulator. Setting /// this to a non-zero value will also enable the packet sending if @@ -462,7 +460,7 @@ namespace OpenMetaverse /// Timer for sending AgentUpdate packets private Timer updateTimer; private int updateInterval; - private bool autoResetControls = true; + private bool autoResetControls; /// Default constructor public AgentMovement(GridClient client) diff --git a/Programs/examples/TestClient/Commands/ScriptCommand.cs b/Programs/examples/TestClient/Commands/ScriptCommand.cs index 84a54465..5d334ec3 100644 --- a/Programs/examples/TestClient/Commands/ScriptCommand.cs +++ b/Programs/examples/TestClient/Commands/ScriptCommand.cs @@ -19,8 +19,8 @@ namespace OpenMetaverse.TestClient return "Usage: script [filename]"; // Load the file - string[] lines = null; - try { File.ReadAllLines(args[0]); } + string[] lines; + try { lines = File.ReadAllLines(args[0]); } catch (Exception e) { return e.Message; } // Execute all of the commands