aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2013-11-04 22:09:52 -0800
committerRobert Adams2013-11-04 22:09:52 -0800
commitcd1a23fc142a12bb14ddb9d88d39e6acb41937b4 (patch)
treeddd50bb6c9f1b9cdde9bc52b3eb1612149055552 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentvarregion: remove unused terrain serialization code in SQLite and PGSQL modules (diff)
downloadopensim-SC_OLD-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.zip
opensim-SC_OLD-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.gz
opensim-SC_OLD-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.bz2
opensim-SC_OLD-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.xz
varregion: remove uses of region size constant. In particular, update scene
to check for border crossings based on the size of the region.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 15b7090..edec949 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -376,18 +376,19 @@ public class BSPrim : BSPhysObject
376 { 376 {
377 bool ret = false; 377 bool ret = false;
378 378
379 uint wayOutThere = Constants.RegionSize * Constants.RegionSize; 379 int wayOverThere = -1000;
380 int wayOutThere = 10000;
380 // There have been instances of objects getting thrown way out of bounds and crashing 381 // There have been instances of objects getting thrown way out of bounds and crashing
381 // the border crossing code. 382 // the border crossing code.
382 if ( RawPosition.X < -Constants.RegionSize || RawPosition.X > wayOutThere 383 if ( RawPosition.X < wayOverThere || RawPosition.X > wayOutThere
383 || RawPosition.Y < -Constants.RegionSize || RawPosition.Y > wayOutThere 384 || RawPosition.Y < wayOverThere || RawPosition.X > wayOutThere
384 || RawPosition.Z < -Constants.RegionSize || RawPosition.Z > wayOutThere) 385 || RawPosition.Z < wayOverThere || RawPosition.X > wayOutThere)
385 { 386 {
386 RawPosition = new OMV.Vector3(10, 10, 50); 387 RawPosition = new OMV.Vector3(10, 10, 50);
387 ZeroMotion(inTaintTime); 388 ZeroMotion(inTaintTime);
388 ret = true; 389 ret = true;
389 } 390 }
390 if (RawVelocity.LengthSquared() > BSParam.MaxLinearVelocity) 391 if (RawVelocity.LengthSquared() > BSParam.MaxLinearVelocitySquared)
391 { 392 {
392 RawVelocity = Util.ClampV(RawVelocity, BSParam.MaxLinearVelocity); 393 RawVelocity = Util.ClampV(RawVelocity, BSParam.MaxLinearVelocity);
393 ret = true; 394 ret = true;