aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs31
1 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
index 5ad2136..757f06c 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
@@ -52,7 +52,6 @@ public sealed class BSCharacter : BSPhysObject
52 private bool _setAlwaysRun; 52 private bool _setAlwaysRun;
53 private bool _throttleUpdates; 53 private bool _throttleUpdates;
54 private bool _floatOnWater; 54 private bool _floatOnWater;
55 private OMV.Vector3 _rotationalVelocity;
56 private bool _kinematic; 55 private bool _kinematic;
57 private float _buoyancy; 56 private float _buoyancy;
58 57
@@ -291,7 +290,7 @@ public sealed class BSCharacter : BSPhysObject
291 { 290 {
292 RawVelocity = OMV.Vector3.Zero; 291 RawVelocity = OMV.Vector3.Zero;
293 _acceleration = OMV.Vector3.Zero; 292 _acceleration = OMV.Vector3.Zero;
294 _rotationalVelocity = OMV.Vector3.Zero; 293 RawRotationalVelocity = OMV.Vector3.Zero;
295 294
296 // Zero some other properties directly into the physics engine 295 // Zero some other properties directly into the physics engine
297 PhysScene.TaintedObject(inTaintTime, LocalID, "BSCharacter.ZeroMotion", delegate() 296 PhysScene.TaintedObject(inTaintTime, LocalID, "BSCharacter.ZeroMotion", delegate()
@@ -303,7 +302,7 @@ public sealed class BSCharacter : BSPhysObject
303 302
304 public override void ZeroAngularMotion(bool inTaintTime) 303 public override void ZeroAngularMotion(bool inTaintTime)
305 { 304 {
306 _rotationalVelocity = OMV.Vector3.Zero; 305 RawRotationalVelocity = OMV.Vector3.Zero;
307 306
308 PhysScene.TaintedObject(inTaintTime, LocalID, "BSCharacter.ZeroMotion", delegate() 307 PhysScene.TaintedObject(inTaintTime, LocalID, "BSCharacter.ZeroMotion", delegate()
309 { 308 {
@@ -351,7 +350,6 @@ public sealed class BSCharacter : BSPhysObject
351 } 350 }
352 } 351 }
353 352
354
355 // Check that the current position is sane and, if not, modify the position to make it so. 353 // Check that the current position is sane and, if not, modify the position to make it so.
356 // Check for being below terrain or on water. 354 // Check for being below terrain or on water.
357 // Returns 'true' of the position was made sane by some action. 355 // Returns 'true' of the position was made sane by some action.
@@ -503,6 +501,17 @@ public sealed class BSCharacter : BSPhysObject
503 } 501 }
504 } 502 }
505 503
504 // SetMomentum just sets the velocity without a target. We need to stop the movement actor if a character.
505 public override void SetMomentum(OMV.Vector3 momentum)
506 {
507 if (m_moveActor != null)
508 {
509 m_moveActor.SetVelocityAndTarget(OMV.Vector3.Zero, OMV.Vector3.Zero, false /* inTaintTime */);
510 }
511 base.SetMomentum(momentum);
512 }
513
514
506 public override OMV.Vector3 Torque { 515 public override OMV.Vector3 Torque {
507 get { return RawTorque; } 516 get { return RawTorque; }
508 set { RawTorque = value; 517 set { RawTorque = value;
@@ -618,14 +627,6 @@ public sealed class BSCharacter : BSPhysObject
618 }); 627 });
619 } 628 }
620 } 629 }
621 public override OMV.Vector3 RotationalVelocity {
622 get { return _rotationalVelocity; }
623 set { _rotationalVelocity = value; }
624 }
625 public override OMV.Vector3 ForceRotationalVelocity {
626 get { return _rotationalVelocity; }
627 set { _rotationalVelocity = value; }
628 }
629 public override bool Kinematic { 630 public override bool Kinematic {
630 get { return _kinematic; } 631 get { return _kinematic; }
631 set { _kinematic = value; } 632 set { _kinematic = value; }
@@ -716,8 +717,6 @@ public sealed class BSCharacter : BSPhysObject
716 717
717 public override void AddAngularForce(bool inTaintTime, OMV.Vector3 force) { 718 public override void AddAngularForce(bool inTaintTime, OMV.Vector3 force) {
718 } 719 }
719 public override void SetMomentum(OMV.Vector3 momentum) {
720 }
721 720
722 // The avatar's physical shape (whether capsule or cube) is unit sized. BulletSim sets 721 // The avatar's physical shape (whether capsule or cube) is unit sized. BulletSim sets
723 // the scale of that unit shape to create the avatars full size. 722 // the scale of that unit shape to create the avatars full size.
@@ -841,7 +840,7 @@ public sealed class BSCharacter : BSPhysObject
841 RawVelocity = entprop.Velocity; 840 RawVelocity = entprop.Velocity;
842 841
843 _acceleration = entprop.Acceleration; 842 _acceleration = entprop.Acceleration;
844 _rotationalVelocity = entprop.RotationalVelocity; 843 RawRotationalVelocity = entprop.RotationalVelocity;
845 844
846 // Do some sanity checking for the avatar. Make sure it's above ground and inbounds. 845 // Do some sanity checking for the avatar. Make sure it's above ground and inbounds.
847 if (PositionSanityCheck(true)) 846 if (PositionSanityCheck(true))
@@ -861,7 +860,7 @@ public sealed class BSCharacter : BSPhysObject
861 // PhysScene.PostUpdate(this); 860 // PhysScene.PostUpdate(this);
862 861
863 DetailLog("{0},BSCharacter.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}", 862 DetailLog("{0},BSCharacter.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}",
864 LocalID, RawPosition, RawOrientation, RawVelocity, _acceleration, _rotationalVelocity); 863 LocalID, RawPosition, RawOrientation, RawVelocity, _acceleration, RawRotationalVelocity);
865 } 864 }
866} 865}
867} 866}