From e67ba0ad06a0ff54834892257d8e7bc39b4fc892 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 21 Nov 2011 20:01:34 +0000 Subject: rename ODECharacter.AvatarGeomAndBodyCreation() -> CreateOdeStructures() to match existing DestroyOdeStructures() --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index afa8de5..5a7626e 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -542,16 +542,18 @@ namespace OpenSim.Region.Physics.OdePlugin } /// - /// This creates the Avatar's physical Surrogate at the position supplied + /// This creates the Avatar's physical Surrogate in ODE at the position supplied /// + /// + /// WARNING: This MUST NOT be called outside of ProcessTaints, else we can have unsynchronized access + /// to ODE internals. ProcessTaints is called from within thread-locked Simulate(), so it is the only + /// place that is safe to call this routine AvatarGeomAndBodyCreation. + /// /// /// /// - - // WARNING: This MUST NOT be called outside of ProcessTaints, else we can have unsynchronized access - // to ODE internals. ProcessTaints is called from within thread-locked Simulate(), so it is the only - // place that is safe to call this routine AvatarGeomAndBodyCreation. - private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) + /// + private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor) { int dAMotorEuler = 1; // _parent_scene.waitForSpaceUnlock(_parent_scene.space); @@ -1268,7 +1270,7 @@ namespace OpenSim.Region.Physics.OdePlugin + (Amotor!=IntPtr.Zero ? "Amotor ":"")); } - AvatarGeomAndBodyCreation(_position.X, _position.Y, _position.Z, m_tensor); + CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor); _parent_scene.AddCharacter(this); } else @@ -1296,7 +1298,7 @@ namespace OpenSim.Region.Physics.OdePlugin float prevCapsule = CAPSULE_LENGTH; CAPSULE_LENGTH = m_tainted_CAPSULE_LENGTH; - AvatarGeomAndBodyCreation( + CreateOdeStructures( _position.X, _position.Y, _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); -- cgit v1.1