aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 446e44c..35d22c0 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -332,12 +332,12 @@ public sealed class BSPrim : BSPhysObject
332 332
333 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position); 333 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position);
334 OMV.Vector3 upForce = OMV.Vector3.Zero; 334 OMV.Vector3 upForce = OMV.Vector3.Zero;
335 if (Position.Z < terrainHeight) 335 if (RawPosition.Z < terrainHeight)
336 { 336 {
337 DetailLog("{0},BSPrim.PositionAdjustUnderGround,call,pos={1},terrain={2}", LocalID, _position, terrainHeight); 337 DetailLog("{0},BSPrim.PositionAdjustUnderGround,call,pos={1},terrain={2}", LocalID, _position, terrainHeight);
338 float targetHeight = terrainHeight + (Size.Z / 2f); 338 float targetHeight = terrainHeight + (Size.Z / 2f);
339 // Upforce proportional to the distance away from the terrain. Correct the error in 1 sec. 339 // Upforce proportional to the distance away from the terrain. Correct the error in 1 sec.
340 upForce.Z = (terrainHeight - Position.Z) * 1f; 340 upForce.Z = (terrainHeight - RawPosition.Z) * 1f;
341 ret = true; 341 ret = true;
342 } 342 }
343 343
@@ -345,10 +345,10 @@ public sealed class BSPrim : BSPhysObject
345 { 345 {
346 float waterHeight = PhysicsScene.TerrainManager.GetWaterLevelAtXYZ(_position); 346 float waterHeight = PhysicsScene.TerrainManager.GetWaterLevelAtXYZ(_position);
347 // TODO: a floating motor so object will bob in the water 347 // TODO: a floating motor so object will bob in the water
348 if (Math.Abs(Position.Z - waterHeight) > 0.1f) 348 if (Math.Abs(RawPosition.Z - waterHeight) > 0.1f)
349 { 349 {
350 // Upforce proportional to the distance away from the water. Correct the error in 1 sec. 350 // Upforce proportional to the distance away from the water. Correct the error in 1 sec.
351 upForce.Z = (waterHeight - Position.Z) * 1f; 351 upForce.Z = (waterHeight - RawPosition.Z) * 1f;
352 ret = true; 352 ret = true;
353 } 353 }
354 } 354 }