From bfdf2479fb3a0fe401df743b162db65ef5384083 Mon Sep 17 00:00:00 2001 From: nlin Date: Wed, 14 Jan 2009 04:59:57 +0000 Subject: Improve parsing of joint parameters for NINJA physics (Mantis #2966). Multiple spaces or leading/trailing spaces when specifying the prims to connect should no longer cause problems. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index b22830c..1fffd7f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1470,7 +1470,7 @@ if (m_shape != null) { List bodyNames = new List(); string RawParams = Description; - string[] jointParams = RawParams.Split(' '); + string[] jointParams = RawParams.Split(" ".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries); string trackedBodyName = null; if (jointParams.Length >= 2) { diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index f735f60..e45bcda 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -2318,7 +2318,7 @@ namespace OpenSim.Region.Physics.OdePlugin foreach (PhysicsJoint joint in pendingJoints) { //DoJointErrorMessage(joint, "taint: time to create joint with parms: " + joint.RawParams); - string[] jointParams = joint.RawParams.Split(' '); + string[] jointParams = joint.RawParams.Split(" ".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries); List jointBodies = new List(); bool allJointBodiesAreReady = true; foreach (string jointParam in jointParams) -- cgit v1.1