diff options
author | Justin Clarke Casey | 2008-10-16 17:14:02 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-16 17:14:02 +0000 |
commit | 4df08aed304875e1e435272a92d58bf20a1bbe4d (patch) | |
tree | 1b643dcfcb84a5a9d24f69955f83afe824368fb2 | |
parent | fix line endings, as apparently the bot didn't do this yet (diff) | |
download | opensim-SC_OLD-4df08aed304875e1e435272a92d58bf20a1bbe4d.zip opensim-SC_OLD-4df08aed304875e1e435272a92d58bf20a1bbe4d.tar.gz opensim-SC_OLD-4df08aed304875e1e435272a92d58bf20a1bbe4d.tar.bz2 opensim-SC_OLD-4df08aed304875e1e435272a92d58bf20a1bbe4d.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2401
* Removes spacers that are also separators in llParseString2List
* Thanks idb
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
2 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 9ad9318..23481c6 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -411,6 +411,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
411 | _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; | 411 | _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; |
412 | } | 412 | } |
413 | } | 413 | } |
414 | |||
414 | /// <summary> | 415 | /// <summary> |
415 | /// This creates the Avatar's physical Surrogate at the position supplied | 416 | /// This creates the Avatar's physical Surrogate at the position supplied |
416 | /// </summary> | 417 | /// </summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9df318c..d385042 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 | |||
4598 | // ScriptSleep(5000); | 4598 | // ScriptSleep(5000); |
4599 | } | 4599 | } |
4600 | 4600 | ||
4601 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers) | 4601 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) |
4602 | { | 4602 | { |
4603 | m_host.AddScriptLPS(1); | 4603 | m_host.AddScriptLPS(1); |
4604 | LSL_List ret = new LSL_List(); | 4604 | LSL_List ret = new LSL_List(); |
4605 | LSL_List spacers = new LSL_List(); | ||
4606 | if (in_spacers.Length > 0 && separators.Length > 0) | ||
4607 | { | ||
4608 | for (int i = 0; i < in_spacers.Length; i++) | ||
4609 | { | ||
4610 | object s = in_spacers.Data[i]; | ||
4611 | for (int j = 0; j < separators.Length; j++) | ||
4612 | { | ||
4613 | if (separators.Data[j].ToString() == s.ToString()) | ||
4614 | { | ||
4615 | s = null; | ||
4616 | break; | ||
4617 | } | ||
4618 | } | ||
4619 | if (s != null) | ||
4620 | { | ||
4621 | spacers.Add(s); | ||
4622 | } | ||
4623 | } | ||
4624 | } | ||
4605 | object[] delimiters = new object[separators.Length + spacers.Length]; | 4625 | object[] delimiters = new object[separators.Length + spacers.Length]; |
4606 | separators.Data.CopyTo(delimiters, 0); | 4626 | separators.Data.CopyTo(delimiters, 0); |
4607 | spacers.Data.CopyTo(delimiters, separators.Length); | 4627 | spacers.Data.CopyTo(delimiters, separators.Length); |