From 32438ab1b9a5c270e0a4a2d708f8c7730dc7e617 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 30 Dec 2007 06:18:17 +0000 Subject: * This update rolls back the packetpool and LibSL changes. Please retest and then patch these changes back in. Currently it's not quite ready for 0.5. The down side to this action, is that we loose some performance to the garbage collector for now. Given that the target date for 0.5 is *Two days* from now, I'm taking the initiative to work towards a real stable version. * This update also fixes scripting and some weird physics reactions --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 18 +++++++++--------- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index a118e7c..335c3fc 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -404,18 +404,18 @@ namespace OpenSim.Region.Physics.OdePlugin // ok -- let's stand up straight! //d.Matrix3 StandUpRotationalMatrix = new d.Matrix3(0.8184158f, -0.5744568f, -0.0139677f, 0.5744615f, 0.8185215f, -0.004074608f, 0.01377355f, -0.004689182f, 0.9998941f); //d.BodySetRotation(Body, ref StandUpRotationalMatrix); - d.BodySetRotation(Body, ref m_StandUpRotation); + //d.BodySetRotation(Body, ref m_StandUpRotation); // The above matrix was generated with the amazing standup routine below by danX0r *cheer* - //d.Vector3 feet; - //d.Vector3 head; - //d.BodyGetRelPointPos(Body, 0.0f, 0.0f, -1.0f, out feet); - //d.BodyGetRelPointPos(Body, 0.0f, 0.0f, 1.0f, out head); - //float posture = head.Z - feet.Z; + d.Vector3 feet; + d.Vector3 head; + d.BodyGetRelPointPos(Body, 0.0f, 0.0f, -1.0f, out feet); + d.BodyGetRelPointPos(Body, 0.0f, 0.0f, 1.0f, out head); + float posture = head.Z - feet.Z; // restoring force proportional to lack of posture: - //float servo = (2.5f - posture) * POSTURE_SERVO; - //d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); - //d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); + float servo = (2.5f - posture) * POSTURE_SERVO; + d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); + d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); //m_lastUpdateSent = false; } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 006d829..f8ab8e7 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -300,11 +300,11 @@ namespace OpenSim.Region.Physics.OdePlugin { if (p2.PhysicsActorType == (int) ActorTypes.Agent) { - p2.CollidingObj = true; + //p2.CollidingObj = true; //contacts[i].depth = 0.003f; - p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); - OdeCharacter character = (OdeCharacter) p2; - character.SetPidStatus(true); + //p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); + //OdeCharacter character = (OdeCharacter) p2; + //character.SetPidStatus(true); //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); } @@ -316,12 +316,12 @@ namespace OpenSim.Region.Physics.OdePlugin if (p1.PhysicsActorType == (int) ActorTypes.Agent) { - p1.CollidingObj = true; + //p1.CollidingObj = true; //contacts[i].depth = 0.003f; - p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); + //p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); //contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p2.Size.X / 2), contacts[i].pos.Y + (p2.Size.Y / 2), contacts[i].pos.Z + (p2.Size.Z / 2)); - OdeCharacter character = (OdeCharacter)p1; - character.SetPidStatus(true); + //OdeCharacter character = (OdeCharacter)p1; + //character.SetPidStatus(true); } else { -- cgit v1.1