aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-12-16 21:15:49 -0800
committerRobert Adams2012-12-16 21:19:12 -0800
commit7ed860d3ac8307b2f404fea1c40471ee488cf70e (patch)
tree63282fa6b7eac95e7be8bb23267f8505053d297a /OpenSim
parentBulletSim: refactor to combine common terrain height testing code. Add functi... (diff)
downloadopensim-SC_OLD-7ed860d3ac8307b2f404fea1c40471ee488cf70e.zip
opensim-SC_OLD-7ed860d3ac8307b2f404fea1c40471ee488cf70e.tar.gz
opensim-SC_OLD-7ed860d3ac8307b2f404fea1c40471ee488cf70e.tar.bz2
opensim-SC_OLD-7ed860d3ac8307b2f404fea1c40471ee488cf70e.tar.xz
BulletSim: add check for border crossing in character position sanity check.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 0defb24..4dd6264 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -311,6 +311,15 @@ public sealed class BSCharacter : BSPhysObject
311 { 311 {
312 bool ret = false; 312 bool ret = false;
313 313
314 // TODO: check for out of bounds
315 if (!PhysicsScene.TerrainManager.IsWithinKnownTerrain(_position))
316 {
317 // The character is out of the known/simulated area.
318 // Upper levels of code will handle the transition to other areas so, for
319 // the time, we just ignore the position.
320 return ret;
321 }
322
314 // If below the ground, move the avatar up 323 // If below the ground, move the avatar up
315 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position); 324 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position);
316 if (Position.Z < terrainHeight) 325 if (Position.Z < terrainHeight)
@@ -329,7 +338,6 @@ public sealed class BSCharacter : BSPhysObject
329 } 338 }
330 } 339 }
331 340
332 // TODO: check for out of bounds
333 return ret; 341 return ret;
334 } 342 }
335 343
@@ -700,7 +708,7 @@ public sealed class BSCharacter : BSPhysObject
700 } 708 }
701 709
702 // Tell the linkset about value changes 710 // Tell the linkset about value changes
703 Linkset.UpdateProperties(this); 711 Linkset.UpdateProperties(this, true);
704 712
705 // Avatars don't report their changes the usual way. Changes are checked for in the heartbeat loop. 713 // Avatars don't report their changes the usual way. Changes are checked for in the heartbeat loop.
706 // base.RequestPhysicsterseUpdate(); 714 // base.RequestPhysicsterseUpdate();