From 6ecdadb32999aed776df29e53541326958daf836 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 16 Mar 2012 17:13:06 -0700 Subject: BulletSim: set buoyancy in only one place --- OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 0cab5d1..e816b61 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -260,11 +260,8 @@ public class BSCharacter : PhysicsActor get { return _flying; } set { _flying = value; - _scene.TaintedObject(delegate() - { - // simulate flying by changing the effect of gravity - BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _flying ? 1f : 0f); - }); + // simulate flying by changing the effect of gravity + this.Buoyancy(_flying ? 1f : 0f); } } public override bool @@ -299,6 +296,7 @@ public class BSCharacter : PhysicsActor get { return _kinematic; } set { _kinematic = value; } } + // neg=fall quickly, 0=1g, 1=0g, pos=float up public override float Buoyancy { get { return _buoyancy; } set { _buoyancy = value; -- cgit v1.1