aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorRobert Adams2012-12-29 08:32:57 -0800
committerRobert Adams2012-12-29 08:32:57 -0800
commit0538096fa3397c52b1171a3ec83dc88489002710 (patch)
tree49d225015acc572f24a4aaea7f4b668d058ccb75 /OpenSim/Region/Physics
parentBulletSim: tweeking avatar capsule code in an attempt to have (diff)
downloadopensim-SC_OLD-0538096fa3397c52b1171a3ec83dc88489002710.zip
opensim-SC_OLD-0538096fa3397c52b1171a3ec83dc88489002710.tar.gz
opensim-SC_OLD-0538096fa3397c52b1171a3ec83dc88489002710.tar.bz2
opensim-SC_OLD-0538096fa3397c52b1171a3ec83dc88489002710.tar.xz
BulletSim: an 'if' to suppress multiple setting of avatar orientation.
Looks like the viewer bombards the server with avatar orientation information (we're talking several hundred a second) when the avatar is being turned or when walking. This change just reduces the number of 'set' calls into unmanaged code.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 9659542..e19b5b3 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -558,12 +558,16 @@ public sealed class BSCharacter : BSPhysObject
558 public override OMV.Quaternion Orientation { 558 public override OMV.Quaternion Orientation {
559 get { return _orientation; } 559 get { return _orientation; }
560 set { 560 set {
561 _orientation = value; 561 // Orientation is set zillions of times when an avatar is walking. It's like
562 // m_log.DebugFormat("{0}: set orientation to {1}", LogHeader, _orientation); 562 // the viewer doesn't trust us.
563 PhysicsScene.TaintedObject("BSCharacter.setOrientation", delegate() 563 if (_orientation != value)
564 { 564 {
565 ForceOrientation = _orientation; 565 _orientation = value;
566 }); 566 PhysicsScene.TaintedObject("BSCharacter.setOrientation", delegate()
567 {
568 ForceOrientation = _orientation;
569 });
570 }
567 } 571 }
568 } 572 }
569 // Go directly to Bullet to get/set the value. 573 // Go directly to Bullet to get/set the value.