diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index b918f84..48cd89b 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -42,8 +42,6 @@ public sealed class BSPrim : PhysicsActor | |||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | private static readonly string LogHeader = "[BULLETS PRIM]"; | 43 | private static readonly string LogHeader = "[BULLETS PRIM]"; |
44 | 44 | ||
45 | private void DebugLog(string mm, params Object[] xx) { if (_scene.ShouldDebugLog) m_log.DebugFormat(mm, xx); } | ||
46 | |||
47 | private IMesh _mesh; | 45 | private IMesh _mesh; |
48 | private PrimitiveBaseShape _pbs; | 46 | private PrimitiveBaseShape _pbs; |
49 | private ShapeData.PhysicsShapeType _shapeType; | 47 | private ShapeData.PhysicsShapeType _shapeType; |
@@ -232,7 +230,6 @@ public sealed class BSPrim : PhysicsActor | |||
232 | BSPrim parent = obj as BSPrim; | 230 | BSPrim parent = obj as BSPrim; |
233 | if (parent != null) | 231 | if (parent != null) |
234 | { | 232 | { |
235 | DebugLog("{0}: link {1}/{2} to {3}", LogHeader, _avName, _localID, parent.LocalID); | ||
236 | BSPrim parentBefore = _linkset.LinksetRoot; | 233 | BSPrim parentBefore = _linkset.LinksetRoot; |
237 | int childrenBefore = _linkset.NumberOfChildren; | 234 | int childrenBefore = _linkset.NumberOfChildren; |
238 | 235 | ||
@@ -248,8 +245,6 @@ public sealed class BSPrim : PhysicsActor | |||
248 | public override void delink() { | 245 | public override void delink() { |
249 | // TODO: decide if this parent checking needs to happen at taint time | 246 | // TODO: decide if this parent checking needs to happen at taint time |
250 | // Race condition here: if link() and delink() in same simulation tick, the delink will not happen | 247 | // Race condition here: if link() and delink() in same simulation tick, the delink will not happen |
251 | DebugLog("{0}: delink {1}/{2}. Parent={3}", LogHeader, _avName, _localID, | ||
252 | _linkset.LinksetRoot._avName+"/"+_linkset.LinksetRoot.LocalID.ToString()); | ||
253 | 248 | ||
254 | BSPrim parentBefore = _linkset.LinksetRoot; | 249 | BSPrim parentBefore = _linkset.LinksetRoot; |
255 | int childrenBefore = _linkset.NumberOfChildren; | 250 | int childrenBefore = _linkset.NumberOfChildren; |
@@ -1042,7 +1037,14 @@ public sealed class BSPrim : PhysicsActor | |||
1042 | // No locking here because this is done when we know physics is not simulating | 1037 | // No locking here because this is done when we know physics is not simulating |
1043 | private void CreateGeomMesh() | 1038 | private void CreateGeomMesh() |
1044 | { | 1039 | { |
1045 | float lod = _pbs.SculptEntry ? _scene.SculptLOD : _scene.MeshLOD; | 1040 | // level of detail based on size and type of the object |
1041 | float lod = _scene.MeshLOD; | ||
1042 | if (_pbs.SculptEntry) | ||
1043 | lod = _scene.SculptLOD; | ||
1044 | float maxAxis = Math.Max(_size.X, Math.Max(_size.Y, _size.Z)); | ||
1045 | if (maxAxis > _scene.MeshMegaPrimThreshold) | ||
1046 | lod = _scene.MeshMegaPrimLOD; | ||
1047 | |||
1046 | ulong newMeshKey = (ulong)_pbs.GetMeshKey(_size, lod); | 1048 | ulong newMeshKey = (ulong)_pbs.GetMeshKey(_size, lod); |
1047 | // m_log.DebugFormat("{0}: CreateGeomMesh: lID={1}, oldKey={2}, newKey={3}", LogHeader, _localID, _meshKey, newMeshKey); | 1049 | // m_log.DebugFormat("{0}: CreateGeomMesh: lID={1}, oldKey={2}, newKey={3}", LogHeader, _localID, _meshKey, newMeshKey); |
1048 | 1050 | ||