diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 11 |
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; |