diff options
author | Robert Adams | 2012-09-13 13:51:42 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-15 15:31:54 -0700 |
commit | 6632eb7c051e2638ea1c58c2876e7d6825398556 (patch) | |
tree | 15e19cbd50e4ab1934d7ae2290784cf54488641f /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |
parent | BulletSim: set all linkset objects center of mass to the whole linkset's cent... (diff) | |
download | opensim-SC_OLD-6632eb7c051e2638ea1c58c2876e7d6825398556.zip opensim-SC_OLD-6632eb7c051e2638ea1c58c2876e7d6825398556.tar.gz opensim-SC_OLD-6632eb7c051e2638ea1c58c2876e7d6825398556.tar.bz2 opensim-SC_OLD-6632eb7c051e2638ea1c58c2876e7d6825398556.tar.xz |
BulletSim: Remove calculation and passing of unused collied object type.
Fix collision code to properly sense mega-region children regions as terrain.
When setting an object physical, reset all the physical properties (friction, ...).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index a9b1365..526dbad 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -529,22 +529,20 @@ public class BSCharacter : BSPhysObject | |||
529 | // The collision, if it should be reported to the character, is placed in a collection | 529 | // The collision, if it should be reported to the character, is placed in a collection |
530 | // that will later be sent to the simulator when SendCollisions() is called. | 530 | // that will later be sent to the simulator when SendCollisions() is called. |
531 | CollisionEventUpdate collisionCollection = null; | 531 | CollisionEventUpdate collisionCollection = null; |
532 | public override bool Collide(uint collidingWith, BSPhysObject collidee, ActorTypes type, Vector3 contactPoint, Vector3 contactNormal, float pentrationDepth) | 532 | public override bool Collide(uint collidingWith, BSPhysObject collidee, Vector3 contactPoint, Vector3 contactNormal, float pentrationDepth) |
533 | { | 533 | { |
534 | // m_log.DebugFormat("{0}: Collide: ms={1}, id={2}, with={3}", LogHeader, _subscribedEventsMs, LocalID, collidingWith); | ||
535 | |||
536 | bool ret = false; | 534 | bool ret = false; |
537 | 535 | ||
538 | // The following makes IsColliding() and IsCollidingGround() work | 536 | // The following makes IsColliding() and IsCollidingGround() work |
539 | _collidingStep = Scene.SimulationStep; | 537 | _collidingStep = Scene.SimulationStep; |
540 | if (collidingWith == BSScene.TERRAIN_ID || collidingWith == BSScene.GROUNDPLANE_ID) | 538 | if (collidingWith <= Scene.TerrainManager.HighestTerrainID) |
541 | { | 539 | { |
542 | _collidingGroundStep = Scene.SimulationStep; | 540 | _collidingGroundStep = Scene.SimulationStep; |
543 | } | 541 | } |
544 | // DetailLog("{0},BSCharacter.Collison,call,with={1}", LocalID, collidingWith); | 542 | // DetailLog("{0},BSCharacter.Collison,call,with={1}", LocalID, collidingWith); |
545 | 543 | ||
546 | // throttle collisions to the rate specified in the subscription | 544 | // throttle collisions to the rate specified in the subscription |
547 | if (_subscribedEventsMs != 0) { | 545 | if (SubscribedEvents()) { |
548 | int nowTime = Scene.SimulationNowTime; | 546 | int nowTime = Scene.SimulationNowTime; |
549 | if (nowTime >= _nextCollisionOkTime) { | 547 | if (nowTime >= _nextCollisionOkTime) { |
550 | _nextCollisionOkTime = nowTime + _subscribedEventsMs; | 548 | _nextCollisionOkTime = nowTime + _subscribedEventsMs; |