diff options
author | Justin Clark-Casey (justincc) | 2011-11-21 20:01:34 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-21 20:01:34 +0000 |
commit | e67ba0ad06a0ff54834892257d8e7bc39b4fc892 (patch) | |
tree | 36500a0e576c86cdb65ee40f7132703b2f8a3cf0 /OpenSim/Region | |
parent | refactor: Eliminate one line ODECharacter.doForce() method for code clarity (diff) | |
download | opensim-SC_OLD-e67ba0ad06a0ff54834892257d8e7bc39b4fc892.zip opensim-SC_OLD-e67ba0ad06a0ff54834892257d8e7bc39b4fc892.tar.gz opensim-SC_OLD-e67ba0ad06a0ff54834892257d8e7bc39b4fc892.tar.bz2 opensim-SC_OLD-e67ba0ad06a0ff54834892257d8e7bc39b4fc892.tar.xz |
rename ODECharacter.AvatarGeomAndBodyCreation() -> CreateOdeStructures() to match existing DestroyOdeStructures()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 18 |
1 files changed, 10 insertions, 8 deletions
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 | |||
542 | } | 542 | } |
543 | 543 | ||
544 | /// <summary> | 544 | /// <summary> |
545 | /// This creates the Avatar's physical Surrogate at the position supplied | 545 | /// This creates the Avatar's physical Surrogate in ODE at the position supplied |
546 | /// </summary> | 546 | /// </summary> |
547 | /// <remarks> | ||
548 | /// WARNING: This MUST NOT be called outside of ProcessTaints, else we can have unsynchronized access | ||
549 | /// to ODE internals. ProcessTaints is called from within thread-locked Simulate(), so it is the only | ||
550 | /// place that is safe to call this routine AvatarGeomAndBodyCreation. | ||
551 | /// </remarks> | ||
547 | /// <param name="npositionX"></param> | 552 | /// <param name="npositionX"></param> |
548 | /// <param name="npositionY"></param> | 553 | /// <param name="npositionY"></param> |
549 | /// <param name="npositionZ"></param> | 554 | /// <param name="npositionZ"></param> |
550 | 555 | /// <param name="tensor"></param> | |
551 | // WARNING: This MUST NOT be called outside of ProcessTaints, else we can have unsynchronized access | 556 | private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor) |
552 | // to ODE internals. ProcessTaints is called from within thread-locked Simulate(), so it is the only | ||
553 | // place that is safe to call this routine AvatarGeomAndBodyCreation. | ||
554 | private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) | ||
555 | { | 557 | { |
556 | int dAMotorEuler = 1; | 558 | int dAMotorEuler = 1; |
557 | // _parent_scene.waitForSpaceUnlock(_parent_scene.space); | 559 | // _parent_scene.waitForSpaceUnlock(_parent_scene.space); |
@@ -1268,7 +1270,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1268 | + (Amotor!=IntPtr.Zero ? "Amotor ":"")); | 1270 | + (Amotor!=IntPtr.Zero ? "Amotor ":"")); |
1269 | } | 1271 | } |
1270 | 1272 | ||
1271 | AvatarGeomAndBodyCreation(_position.X, _position.Y, _position.Z, m_tensor); | 1273 | CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor); |
1272 | _parent_scene.AddCharacter(this); | 1274 | _parent_scene.AddCharacter(this); |
1273 | } | 1275 | } |
1274 | else | 1276 | else |
@@ -1296,7 +1298,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1296 | float prevCapsule = CAPSULE_LENGTH; | 1298 | float prevCapsule = CAPSULE_LENGTH; |
1297 | CAPSULE_LENGTH = m_tainted_CAPSULE_LENGTH; | 1299 | CAPSULE_LENGTH = m_tainted_CAPSULE_LENGTH; |
1298 | 1300 | ||
1299 | AvatarGeomAndBodyCreation( | 1301 | CreateOdeStructures( |
1300 | _position.X, | 1302 | _position.X, |
1301 | _position.Y, | 1303 | _position.Y, |
1302 | _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); | 1304 | _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); |