From e6eeaaea6717f68c1ad622c4fbd308917b3d1408 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 17 Nov 2010 22:55:06 +0000 Subject: minor: add some method comments --- OpenSim/Framework/Util.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index addfe5d..e8f8e01 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -451,6 +451,14 @@ namespace OpenSim.Framework return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); } + /// + /// Are the co-ordinates of the new region visible from the old region? + /// + /// Old region x-coord + /// New region x-coord + /// Old region y-coord + /// New region y-coord + /// public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy) { // Eventually this will be a function of the draw distance / camera position too. -- cgit v1.1 From c072a9cfb3e74d58ec89fccf56cd67be97b99df9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 17 Nov 2010 23:34:39 +0000 Subject: save all lines to history, not just those which turn out to be valid comands. does not store passwords also, blank lines are not stored to history this makes it easier to go back and correct a command which was simply mistyped rather than having to type it out again --- OpenSim/Framework/Console/LocalConsole.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 5f2f404..6966211 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -473,9 +473,11 @@ namespace OpenSim.Framework.Console y = -1; } + string commandLine = cmdline.ToString(); + if (isCommand) { - string[] cmd = Commands.Resolve(Parser.Parse(cmdline.ToString())); + string[] cmd = Commands.Resolve(Parser.Parse(commandLine)); if (cmd.Length != 0) { @@ -491,7 +493,10 @@ namespace OpenSim.Framework.Console } } - //AddToHistory(cmdline.ToString()); + // If we're not echoing to screen (e.g. a password) then we probably don't want it in history + if (echo && commandLine != "") + AddToHistory(commandLine); + return cmdline.ToString(); default: break; -- cgit v1.1 From 859234f963115eb4307b09dc888adfaeed9537b8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 17 Nov 2010 23:50:23 +0000 Subject: small refactor: reuse existing commandLine string rather than calling cmdline.ToString() again --- OpenSim/Framework/Console/LocalConsole.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 6966211..eda41b8 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -497,7 +497,7 @@ namespace OpenSim.Framework.Console if (echo && commandLine != "") AddToHistory(commandLine); - return cmdline.ToString(); + return commandLine; default: break; } -- cgit v1.1