diff options
author | Robert Adams | 2012-12-11 00:35:16 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-11 00:35:16 -0800 |
commit | 905d7c43ad34869df03b21fcd24eb8ea8c6beeae (patch) | |
tree | a6c741e76d3a4ff2cba01a2c228bcd5f37a6212d /OpenSim/Region | |
parent | BulletSim: add ini file and command line parameters to control (diff) | |
download | opensim-SC_OLD-905d7c43ad34869df03b21fcd24eb8ea8c6beeae.zip opensim-SC_OLD-905d7c43ad34869df03b21fcd24eb8ea8c6beeae.tar.gz opensim-SC_OLD-905d7c43ad34869df03b21fcd24eb8ea8c6beeae.tar.bz2 opensim-SC_OLD-905d7c43ad34869df03b21fcd24eb8ea8c6beeae.tar.xz |
BulletSim: modify LIMIT_MOTOR_UP to limit BOAT types to be at water rather than ground level. This makes boats float at water level better but not perfectly. There probably needs to be some interaction between HOVER and LIMIT_MOTOR_UP.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index acddc09..82e829e 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -993,8 +993,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
993 | 993 | ||
994 | if ((m_flags & (VehicleFlag.LIMIT_MOTOR_UP)) != 0) | 994 | if ((m_flags & (VehicleFlag.LIMIT_MOTOR_UP)) != 0) |
995 | { | 995 | { |
996 | // If the vehicle is motoring into the sky, get it going back down. | 996 | float targetHeight = Type == Vehicle.TYPE_BOAT ? GetWaterLevel(VehiclePosition) : GetTerrainHeight(VehiclePosition); |
997 | float distanceAboveGround = VehiclePosition.Z - GetTerrainHeight(VehiclePosition); | 997 | float distanceAboveGround = VehiclePosition.Z - targetHeight; |
998 | // Not colliding if the vehicle is off the ground | 998 | // Not colliding if the vehicle is off the ground |
999 | if (!Prim.IsColliding) | 999 | if (!Prim.IsColliding) |
1000 | { | 1000 | { |