diff options
author | Justin Clark-Casey | 2014-05-27 23:29:54 +0100 |
---|---|---|
committer | Justin Clark-Casey | 2014-05-27 23:29:54 +0100 |
commit | 3f703ae1cb02cbcb0efaff061d495bacca941de0 (patch) | |
tree | 3221068b4bc4119023b3dfa621c19e126c2eb3f3 /OpenSim/Region/Physics | |
parent | Merge branch 'master' into 0.8-post-fixes (diff) | |
parent | minor: Comment out 2 error level debugging message in authentication code (diff) | |
download | opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.zip opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.gz opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.bz2 opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.xz |
Merge branch 'master' into 0.8-post-fixes
Diffstat (limited to 'OpenSim/Region/Physics')
4 files changed, 25 insertions, 18 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 8e40561..f53adcb 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | |||
@@ -147,6 +147,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
147 | terrainHeight = _heightMap[(int)actor.Position.Y * (int)m_regionExtent.Y + (int)actor.Position.X]; | 147 | terrainHeight = _heightMap[(int)actor.Position.Y * (int)m_regionExtent.Y + (int)actor.Position.X]; |
148 | 148 | ||
149 | float height = terrainHeight + actor.Size.Z; | 149 | float height = terrainHeight + actor.Size.Z; |
150 | // Console.WriteLine("height {0}, actorPosition {1}", height, actorPosition); | ||
150 | 151 | ||
151 | if (actor.Flying) | 152 | if (actor.Flying) |
152 | { | 153 | { |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs index 1bcf879..1b8a454 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs | |||
@@ -399,8 +399,8 @@ public class BSActorAvatarMove : BSActor | |||
399 | m_controllingPrim.ForcePosition = m_controllingPrim.RawPosition + displacement; | 399 | m_controllingPrim.ForcePosition = m_controllingPrim.RawPosition + displacement; |
400 | } | 400 | } |
401 | } | 401 | } |
402 | m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs.ComputeStairCorrection,disp={1},force={2}", | 402 | m_physicsScene.DetailLog("{0},BSCharacter.WalkUpStairs.ComputeStairCorrection,stepUp={1},isp={2},force={3}", |
403 | m_controllingPrim.LocalID, displacement, ret); | 403 | m_controllingPrim.LocalID, stepUp, displacement, ret); |
404 | 404 | ||
405 | } | 405 | } |
406 | return ret; | 406 | return ret; |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 6683446..de42a4c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -598,9 +598,9 @@ public static class BSParam | |||
598 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", | 598 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", |
599 | 1.0f ), | 599 | 1.0f ), |
600 | new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", | 600 | new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", |
601 | 1.0f ), | 601 | 2.0f ), |
602 | new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", | 602 | new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", |
603 | 2 ), | 603 | 1 ), |
604 | 604 | ||
605 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", | 605 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", |
606 | 1000.0f, | 606 | 1000.0f, |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 9fa55ce..23bada9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -639,15 +639,18 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
639 | { | 639 | { |
640 | if (collidersCount > 0) | 640 | if (collidersCount > 0) |
641 | { | 641 | { |
642 | for (int ii = 0; ii < collidersCount; ii++) | 642 | lock (PhysObjects) |
643 | { | 643 | { |
644 | uint cA = m_collisionArray[ii].aID; | 644 | for (int ii = 0; ii < collidersCount; ii++) |
645 | uint cB = m_collisionArray[ii].bID; | 645 | { |
646 | Vector3 point = m_collisionArray[ii].point; | 646 | uint cA = m_collisionArray[ii].aID; |
647 | Vector3 normal = m_collisionArray[ii].normal; | 647 | uint cB = m_collisionArray[ii].bID; |
648 | float penetration = m_collisionArray[ii].penetration; | 648 | Vector3 point = m_collisionArray[ii].point; |
649 | SendCollision(cA, cB, point, normal, penetration); | 649 | Vector3 normal = m_collisionArray[ii].normal; |
650 | SendCollision(cB, cA, point, -normal, penetration); | 650 | float penetration = m_collisionArray[ii].penetration; |
651 | SendCollision(cA, cB, point, normal, penetration); | ||
652 | SendCollision(cB, cA, point, -normal, penetration); | ||
653 | } | ||
651 | } | 654 | } |
652 | } | 655 | } |
653 | } | 656 | } |
@@ -658,14 +661,17 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
658 | { | 661 | { |
659 | if (updatedEntityCount > 0) | 662 | if (updatedEntityCount > 0) |
660 | { | 663 | { |
661 | for (int ii = 0; ii < updatedEntityCount; ii++) | 664 | lock (PhysObjects) |
662 | { | 665 | { |
663 | EntityProperties entprop = m_updateArray[ii]; | 666 | for (int ii = 0; ii < updatedEntityCount; ii++) |
664 | BSPhysObject pobj; | ||
665 | if (PhysObjects.TryGetValue(entprop.ID, out pobj)) | ||
666 | { | 667 | { |
667 | if (pobj.IsInitialized) | 668 | EntityProperties entprop = m_updateArray[ii]; |
668 | pobj.UpdateProperties(entprop); | 669 | BSPhysObject pobj; |
670 | if (PhysObjects.TryGetValue(entprop.ID, out pobj)) | ||
671 | { | ||
672 | if (pobj.IsInitialized) | ||
673 | pobj.UpdateProperties(entprop); | ||
674 | } | ||
669 | } | 675 | } |
670 | } | 676 | } |
671 | } | 677 | } |