From 7cb78d73eb007eddbefb647d56a0e140640a7a9e Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 26 Apr 2008 20:49:38 +0000 Subject: Thank you Melanie for implementing llListSort() in linear and strided modes. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 37 +--------------------- 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1a3b6ce..09be26a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2874,42 +2874,7 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) { m_host.AddScriptLPS(1); - // SortedList sorted = new SortedList(); - // Add chunks to an array - //int s = stride; - //if (s < 1) - // s = 1; - //int c = 0; - //LSL_Types.list chunk = new LSL_Types.list(); - //string chunkString = String.Empty; - //foreach (string element in src) - //{ - // c++; - // if (c > s) - // { - // sorted.Add(chunkString, chunk); - // chunkString = String.Empty; - // chunk = new LSL_Types.list(); - // c = 0; - // } - // chunk.Add(element); - // chunkString += element.ToString(); - //} - //if (chunk.Count > 0) - // sorted.Add(chunkString, chunk); - - //LSL_Types.list ret = new LSL_Types.list(); - //foreach (LSL_Types.list ls in sorted.Values) - //{ - // ret.AddRange(ls); - //} - - //if (ascending == LSL_BaseClass.TRUE) - // return ret; - //ret.Reverse(); - //return ret; - NotImplemented("llListSort"); - return new LSL_Types.list(); + return src.Sort(stride, ascending); } public int llGetListLength(LSL_Types.list src) -- cgit v1.1