aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorDiva Canto2012-03-27 10:09:08 -0700
committerDiva Canto2012-03-27 10:09:08 -0700
commit2e2634896d22ee08b0d3fae40f0a8c933190f556 (patch)
tree0d506518180b3892026bff6e0b9b5d00e1894e74 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentSend the config section name up to the service classes themselves (XInventory... (diff)
parentAdd Garmin Kawaguichi to CONTRIBUTORS.txt (diff)
downloadopensim-SC-2e2634896d22ee08b0d3fae40f0a8c933190f556.zip
opensim-SC-2e2634896d22ee08b0d3fae40f0a8c933190f556.tar.gz
opensim-SC-2e2634896d22ee08b0d3fae40f0a8c933190f556.tar.bz2
opensim-SC-2e2634896d22ee08b0d3fae40f0a8c933190f556.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 581d540..94a0ccf 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -78,6 +78,8 @@ public class BSScene : PhysicsScene, IPhysicsParameters
78 78
79 private Dictionary<uint, BSCharacter> m_avatars = new Dictionary<uint, BSCharacter>(); 79 private Dictionary<uint, BSCharacter> m_avatars = new Dictionary<uint, BSCharacter>();
80 private Dictionary<uint, BSPrim> m_prims = new Dictionary<uint, BSPrim>(); 80 private Dictionary<uint, BSPrim> m_prims = new Dictionary<uint, BSPrim>();
81 private HashSet<BSCharacter> m_avatarsWithCollisions = new HashSet<BSCharacter>();
82 private HashSet<BSPrim> m_primsWithCollisions = new HashSet<BSPrim>();
81 private List<BSPrim> m_vehicles = new List<BSPrim>(); 83 private List<BSPrim> m_vehicles = new List<BSPrim>();
82 private float[] m_heightMap; 84 private float[] m_heightMap;
83 private float m_waterLevel; 85 private float m_waterLevel;
@@ -435,6 +437,17 @@ public class BSScene : PhysicsScene, IPhysicsParameters
435 } 437 }
436 } 438 }
437 439
440 // The SendCollision's batch up the collisions on the objects. Now push the collisions into the simulator.
441 foreach (BSPrim bsp in m_primsWithCollisions)
442 bsp.SendCollisions();
443 m_primsWithCollisions.Clear();
444 // foreach (BSCharacter bsc in m_avatarsWithCollisions)
445 // bsc.SendCollisions();
446 // This is a kludge to get avatar movement updated. ODE sends collisions even if there isn't any
447 foreach (KeyValuePair<uint, BSCharacter> kvp in m_avatars)
448 kvp.Value.SendCollisions();
449 m_avatarsWithCollisions.Clear();
450
438 // If any of the objects had updated properties, tell the object it has been changed by the physics engine 451 // If any of the objects had updated properties, tell the object it has been changed by the physics engine
439 if (updatedEntityCount > 0) 452 if (updatedEntityCount > 0)
440 { 453 {
@@ -485,11 +498,13 @@ public class BSScene : PhysicsScene, IPhysicsParameters
485 BSPrim prim; 498 BSPrim prim;
486 if (m_prims.TryGetValue(localID, out prim)) { 499 if (m_prims.TryGetValue(localID, out prim)) {
487 prim.Collide(collidingWith, type, collidePoint, collideNormal, penitration); 500 prim.Collide(collidingWith, type, collidePoint, collideNormal, penitration);
501 m_primsWithCollisions.Add(prim);
488 return; 502 return;
489 } 503 }
490 BSCharacter actor; 504 BSCharacter actor;
491 if (m_avatars.TryGetValue(localID, out actor)) { 505 if (m_avatars.TryGetValue(localID, out actor)) {
492 actor.Collide(collidingWith, type, collidePoint, collideNormal, penitration); 506 actor.Collide(collidingWith, type, collidePoint, collideNormal, penitration);
507 m_avatarsWithCollisions.Add(actor);
493 return; 508 return;
494 } 509 }
495 return; 510 return;