aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorMelanie2011-10-12 00:10:15 +0200
committerMelanie2011-10-12 00:10:15 +0200
commit1c2b5d99c9601a3d301f4bc0f53389cca831ee04 (patch)
tree97fa9c758f429d5dee64234e442f2c83cd1b9994 /OpenSim/Region/Physics/OdePlugin
parentMerge branch 'careminster-presence-refactor' into bigmerge (diff)
parentMerge commit '92c88121c72386f85472c6cf4891eca8b62b9867' into bigmerge (diff)
downloadopensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.zip
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.gz
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.bz2
opensim-SC-1c2b5d99c9601a3d301f4bc0f53389cca831ee04.tar.xz
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs19
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs4
2 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index c165a41..c26595c 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -464,10 +464,12 @@ namespace OpenSim.Region.Physics.OdePlugin
464 m_pidControllerActive = true; 464 m_pidControllerActive = true;
465 465
466 Vector3 SetSize = value; 466 Vector3 SetSize = value;
467 m_tainted_CAPSULE_LENGTH = (SetSize.Z*1.15f) - CAPSULE_RADIUS*2.0f; 467 m_tainted_CAPSULE_LENGTH = (SetSize.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
468 //m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString()); 468// m_log.Info("[SIZE]: " + CAPSULE_LENGTH);
469 469
470 Velocity = Vector3.Zero; 470 // If we reset velocity here, then an avatar stalls when it crosses a border for the first time
471 // (as the height of the new root agent is set).
472// Velocity = Vector3.Zero;
471 473
472 _parent_scene.AddPhysicsActorTaint(this); 474 _parent_scene.AddPhysicsActorTaint(this);
473 } 475 }
@@ -785,6 +787,8 @@ namespace OpenSim.Region.Physics.OdePlugin
785 { 787 {
786 m_log.Warn("[PHYSICS]: Got a NaN velocity from Scene in a Character"); 788 m_log.Warn("[PHYSICS]: Got a NaN velocity from Scene in a Character");
787 } 789 }
790
791// m_log.DebugFormat("[PHYSICS]: Set target velocity of {0}", _target_velocity);
788 } 792 }
789 } 793 }
790 794
@@ -1324,7 +1328,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1324 { 1328 {
1325 if (Shell != IntPtr.Zero && Body != IntPtr.Zero && Amotor != IntPtr.Zero) 1329 if (Shell != IntPtr.Zero && Body != IntPtr.Zero && Amotor != IntPtr.Zero)
1326 { 1330 {
1327 1331// m_log.DebugFormat("[PHYSICS]: Changing capsule size");
1332
1328 m_pidControllerActive = true; 1333 m_pidControllerActive = true;
1329 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate() 1334 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate()
1330 d.JointDestroy(Amotor); 1335 d.JointDestroy(Amotor);
@@ -1335,7 +1340,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1335 d.GeomDestroy(Shell); 1340 d.GeomDestroy(Shell);
1336 AvatarGeomAndBodyCreation(_position.X, _position.Y, 1341 AvatarGeomAndBodyCreation(_position.X, _position.Y,
1337 _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); 1342 _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor);
1338 Velocity = Vector3.Zero; 1343
1344 // As with Size, we reset velocity. However, this isn't strictly necessary since it doesn't
1345 // appear to stall initial region crossings when done here. Being done for consistency.
1346// Velocity = Vector3.Zero;
1339 1347
1340 _parent_scene.geom_name_map[Shell] = m_name; 1348 _parent_scene.geom_name_map[Shell] = m_name;
1341 _parent_scene.actor_name_map[Shell] = (PhysicsActor)this; 1349 _parent_scene.actor_name_map[Shell] = (PhysicsActor)this;
@@ -1360,7 +1368,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1360 _position.Z = m_taintPosition.Z; 1368 _position.Z = m_taintPosition.Z;
1361 } 1369 }
1362 } 1370 }
1363
1364 } 1371 }
1365 1372
1366 internal void AddCollisionFrameTime(int p) 1373 internal void AddCollisionFrameTime(int p)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 0a4fc51..8ad0b7f 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1526,6 +1526,7 @@ Console.WriteLine("changeadd 1");
1526 { 1526 {
1527 if (Body == IntPtr.Zero) 1527 if (Body == IntPtr.Zero)
1528 enableBody(); 1528 enableBody();
1529
1529 //Prim auto disable after 20 frames, 1530 //Prim auto disable after 20 frames,
1530 //if you move it, re-enable the prim manually. 1531 //if you move it, re-enable the prim manually.
1531 if (_parent != null) 1532 if (_parent != null)
@@ -1536,6 +1537,7 @@ Console.WriteLine("changeadd 1");
1536 m_linkJoint = IntPtr.Zero; 1537 m_linkJoint = IntPtr.Zero;
1537 } 1538 }
1538 } 1539 }
1540
1539 if (Body != IntPtr.Zero) 1541 if (Body != IntPtr.Zero)
1540 { 1542 {
1541 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); 1543 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
@@ -1599,7 +1601,6 @@ Console.WriteLine(" JointCreateFixed");
1599 float fy = 0; 1601 float fy = 0;
1600 float fz = 0; 1602 float fz = 0;
1601 1603
1602
1603 if (IsPhysical && (Body != IntPtr.Zero) && !m_isSelected && !childPrim) // KF: Only move root prims. 1604 if (IsPhysical && (Body != IntPtr.Zero) && !m_isSelected && !childPrim) // KF: Only move root prims.
1604 { 1605 {
1605 if (m_vehicle.Type != Vehicle.TYPE_NONE) 1606 if (m_vehicle.Type != Vehicle.TYPE_NONE)
@@ -1818,7 +1819,6 @@ Console.WriteLine(" JointCreateFixed");
1818 // 35x10 = 350n times the mass per second applied maximum. 1819 // 35x10 = 350n times the mass per second applied maximum.
1819 float nmax = 35f * m_mass; 1820 float nmax = 35f * m_mass;
1820 float nmin = -35f * m_mass; 1821 float nmin = -35f * m_mass;
1821
1822 1822
1823 if (fx > nmax) 1823 if (fx > nmax)
1824 fx = nmax; 1824 fx = nmax;