From 4df08aed304875e1e435272a92d58bf20a1bbe4d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 16 Oct 2008 17:14:02 +0000 Subject: [PATCH] * Apply http://opensimulator.org/mantis/view.php?id=2401 * Removes spacers that are also separators in llParseString2List * Thanks idb --- .../Region/Physics/OdePlugin/ODECharacter.cs | 1 + .../Shared/Api/Implementation/LSL_Api.cs | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 9ad9318dbc..23481c63fc 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -411,6 +411,7 @@ namespace OpenSim.Region.Physics.OdePlugin _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; } } + /// /// This creates the Avatar's physical Surrogate at the position supplied /// diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9df318c434..d385042c28 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4598,10 +4598,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // ScriptSleep(5000); } - public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers) + public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) { m_host.AddScriptLPS(1); LSL_List ret = new LSL_List(); + LSL_List spacers = new LSL_List(); + if (in_spacers.Length > 0 && separators.Length > 0) + { + for (int i = 0; i < in_spacers.Length; i++) + { + object s = in_spacers.Data[i]; + for (int j = 0; j < separators.Length; j++) + { + if (separators.Data[j].ToString() == s.ToString()) + { + s = null; + break; + } + } + if (s != null) + { + spacers.Add(s); + } + } + } object[] delimiters = new object[separators.Length + spacers.Length]; separators.Data.CopyTo(delimiters, 0); spacers.Data.CopyTo(delimiters, separators.Length);