aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-10-11 22:12:25 +0100
committerMelanie2011-10-11 22:12:25 +0100
commit341efb09420ff917e84e5342dd044611f22e8535 (patch)
tree45aaa42d946dcc671c9749aa6376ee8b59435e44 /OpenSim
parentMerge commit 'adfe713b4340771eee15371dd1216527b5662545' into bigmerge (diff)
parentStop the avatar stalling on its first boarder cross when using the ODE plugin (diff)
downloadopensim-SC_OLD-341efb09420ff917e84e5342dd044611f22e8535.zip
opensim-SC_OLD-341efb09420ff917e84e5342dd044611f22e8535.tar.gz
opensim-SC_OLD-341efb09420ff917e84e5342dd044611f22e8535.tar.bz2
opensim-SC_OLD-341efb09420ff917e84e5342dd044611f22e8535.tar.xz
Merge commit '6f542f73d4aacc0b92c2ebcff84b4ce2c8d9433b' into bigmerge
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs10
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs19
2 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index bc6458f..697a9f8 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -494,6 +494,10 @@ namespace OpenSim.Region.Framework.Scenes
494 if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! 494 if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting!
495 { 495 {
496 m_pos = actor.Position; 496 m_pos = actor.Position;
497
498// m_log.DebugFormat(
499// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!",
500// m_pos, Name, Scene.RegionInfo.RegionName);
497 } 501 }
498 else 502 else
499 { 503 {
@@ -571,8 +575,14 @@ namespace OpenSim.Region.Framework.Scenes
571 { 575 {
572 PhysicsActor actor = m_physicsActor; 576 PhysicsActor actor = m_physicsActor;
573 if (actor != null) 577 if (actor != null)
578 {
574 m_velocity = actor.Velocity; 579 m_velocity = actor.Velocity;
575 580
581// m_log.DebugFormat(
582// "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!",
583// m_velocity, Name, Scene.RegionInfo.RegionName);
584 }
585
576 return m_velocity; 586 return m_velocity;
577 } 587 }
578 set 588 set
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)