From 122c8711fe104f4f06c42e0e2f8dc101bd3c8dfa Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Sun, 30 Mar 2008 23:22:45 +0000 Subject: [PATCH] Added AutoResetControls property that allows persistance of movement controls over updates (mantis #190) git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1695 52acb1d6-8a22-11de-b505-999d5b087335 --- libsecondlife/AgentManagerMovement.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libsecondlife/AgentManagerMovement.cs b/libsecondlife/AgentManagerMovement.cs index f3775502..0964f7a9 100644 --- a/libsecondlife/AgentManagerMovement.cs +++ b/libsecondlife/AgentManagerMovement.cs @@ -407,6 +407,13 @@ namespace libsecondlife get { return (updateInterval != 0); } } + /// Reset movement controls every time we send an update + public bool AutoResetControls + { + get { return autoResetControls; } + set { autoResetControls = value; } + } + #endregion Properties /// Agent camera controls @@ -446,6 +453,7 @@ namespace libsecondlife /// Timer for sending AgentUpdate packets private Timer updateTimer; private int updateInterval; + private bool autoResetControls = true; /// Default constructor public AgentMovement(SecondLife client) @@ -634,7 +642,9 @@ namespace libsecondlife Client.Network.SendPacket(update, simulator); - ResetControlFlags(); + if (autoResetControls) { + ResetControlFlags(); + } } }