aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-20 08:34:18 -0800
committerRobert Adams2012-11-21 16:42:34 -0800
commit2f5fe4b88e8eb0388cc2138c48a941b1317ed560 (patch)
tree47040fe6c84d9584306c7807a8a98217acfb9045 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentIf GetAgents() is called with an empty userIDs array then don't bother with a... (diff)
downloadopensim-SC_OLD-2f5fe4b88e8eb0388cc2138c48a941b1317ed560.zip
opensim-SC_OLD-2f5fe4b88e8eb0388cc2138c48a941b1317ed560.tar.gz
opensim-SC_OLD-2f5fe4b88e8eb0388cc2138c48a941b1317ed560.tar.bz2
opensim-SC_OLD-2f5fe4b88e8eb0388cc2138c48a941b1317ed560.tar.xz
BulletSim: tweek avatar capsule parameters so avatar feet don't go below ground. This solves the bouncing, short avatar problem (Mantis 6403).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 2fee95e..58dccea 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -712,7 +712,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
712 // here just before the physics engine is called to step the simulation. 712 // here just before the physics engine is called to step the simulation.
713 public void ProcessTaints() 713 public void ProcessTaints()
714 { 714 {
715 InTaintTime = true; 715 InTaintTime = true; // Only used for debugging so locking is not necessary.
716 ProcessRegularTaints(); 716 ProcessRegularTaints();
717 ProcessPostTaintTaints(); 717 ProcessPostTaintTaints();
718 InTaintTime = false; 718 InTaintTime = false;
@@ -758,6 +758,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
758 DetailLog("{0},BSScene.ProcessTaints,leftTaintsOnList,numNotProcessed={1}", DetailLogZero, _taintOperations.Count); 758 DetailLog("{0},BSScene.ProcessTaints,leftTaintsOnList,numNotProcessed={1}", DetailLogZero, _taintOperations.Count);
759 } 759 }
760 */ 760 */
761
761 // swizzle a new list into the list location so we can process what's there 762 // swizzle a new list into the list location so we can process what's there
762 List<TaintCallbackEntry> oldList; 763 List<TaintCallbackEntry> oldList;
763 lock (_taintLock) 764 lock (_taintLock)
@@ -787,8 +788,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
787 // will replace any previous operation by the same object. 788 // will replace any previous operation by the same object.
788 public void PostTaintObject(String ident, uint ID, TaintCallback callback) 789 public void PostTaintObject(String ident, uint ID, TaintCallback callback)
789 { 790 {
790 if (!m_initialized) return;
791
792 string uniqueIdent = ident + "-" + ID.ToString(); 791 string uniqueIdent = ident + "-" + ID.ToString();
793 lock (_taintLock) 792 lock (_taintLock)
794 { 793 {
@@ -864,13 +863,14 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
864 } 863 }
865 } 864 }
866 865
866 // Only used for debugging. Does not change state of anything so locking is not necessary.
867 public bool AssertInTaintTime(string whereFrom) 867 public bool AssertInTaintTime(string whereFrom)
868 { 868 {
869 if (!InTaintTime) 869 if (!InTaintTime)
870 { 870 {
871 DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); 871 DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom);
872 m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); 872 m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom);
873 Util.PrintCallStack(); 873 Util.PrintCallStack(); // Prints the stack into the DEBUG log file.
874 } 874 }
875 return InTaintTime; 875 return InTaintTime;
876 } 876 }
@@ -1186,7 +1186,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
1186 (s) => { return s.m_params[0].avatarCapsuleRadius; }, 1186 (s) => { return s.m_params[0].avatarCapsuleRadius; },
1187 (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleRadius, p, l, v); } ), 1187 (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleRadius, p, l, v); } ),
1188 new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar", 1188 new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar",
1189 1.5f, 1189 // 1.5f,
1190 2.140599f,
1190 (s,cf,p,v) => { s.m_params[0].avatarCapsuleHeight = cf.GetFloat(p, v); }, 1191 (s,cf,p,v) => { s.m_params[0].avatarCapsuleHeight = cf.GetFloat(p, v); },
1191 (s) => { return s.m_params[0].avatarCapsuleHeight; }, 1192 (s) => { return s.m_params[0].avatarCapsuleHeight; },
1192 (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleHeight, p, l, v); } ), 1193 (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleHeight, p, l, v); } ),