From 0916b38b8300c41f66c2f22e79c77f3c5f6f4cb7 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 17 Oct 2008 23:19:00 +0000 Subject: * Fix an over compensation for bounciness on flat Primitive * Implement the linear impulse portion of llPushObject. We should have a lsl compatible implementation of that portion of the push. Angular.. well. still have yet to implement a torque accumulator. * llPushObject respects the region and parcel settings for Restrict Push, it also respects GodMode as is defined in the LSL spec. --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 3 ++- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 23481c6..2cb7e43 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -634,8 +634,9 @@ namespace OpenSim.Region.Physics.OdePlugin if (pushforce) { m_pidControllerActive = false; + force *= 100f; doForce(force); - + //System.Console.WriteLine("Push!"); //_target_velocity.X += force.X; // _target_velocity.Y += force.Y; //_target_velocity.Z += force.Z; diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 1dcec12..0cbcb6b 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -575,10 +575,7 @@ namespace OpenSim.Region.Physics.OdePlugin for (int i = 0; i < count; i++) { - if (checkDupe(contacts[i],p2.PhysicsActorType)) - { - continue; - } + max_collision_depth = (contacts[i].depth > max_collision_depth) ? contacts[i].depth : max_collision_depth; //m_log.Warn("[CCOUNT]: " + count); @@ -588,7 +585,7 @@ namespace OpenSim.Region.Physics.OdePlugin // We only need to test p2 for 'jump crouch purposes' p2.IsColliding = true; - + //if ((framecount % m_returncollisions) == 0) switch (p1.PhysicsActorType) @@ -759,7 +756,7 @@ namespace OpenSim.Region.Physics.OdePlugin #endregion - if (contacts[i].depth >= 0f) + if (contacts[i].depth >= 0f && !checkDupe(contacts[i], p2.PhysicsActorType)) { // If we're colliding against terrain if (name1 == "Terrain" || name2 == "Terrain") @@ -863,11 +860,11 @@ namespace OpenSim.Region.Physics.OdePlugin if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f)) && contactGeom.g1 != LandGeom && contactGeom.g2 != LandGeom) { - if (Math.Abs(contact.depth - contactGeom.depth) < 0.272f) + if (Math.Abs(contact.depth - contactGeom.depth) < 0.072f) { //contactGeom.depth *= .00005f; //m_log.DebugFormat("[Collsion]: Depth {0}", Math.Abs(contact.depth - contactGeom.depth)); - // m_log.DebugFormat("[Collision]: <{0},{1},{2}>", Math.Abs(contactGeom.normal.X - contact.normal.X), Math.Abs(contactGeom.normal.Y - contact.normal.Y), Math.Abs(contactGeom.normal.Z - contact.normal.Z)); + //m_log.DebugFormat("[Collision]: <{0},{1},{2}>", Math.Abs(contactGeom.normal.X - contact.normal.X), Math.Abs(contactGeom.normal.Y - contact.normal.Y), Math.Abs(contactGeom.normal.Z - contact.normal.Z)); result = true; break; } -- cgit v1.1