refactor: split out ninja joint part of SOP.DoPhysicsPropertyUpdate() so that we don't have to look at it if it's not relevant

bulletsim
Justin Clark-Casey (justincc) 2011-07-31 02:50:50 +01:00
parent 450bdb3657
commit aea7007533
1 changed files with 101 additions and 86 deletions

View File

@ -1751,9 +1751,12 @@ namespace OpenSim.Region.Framework.Scenes
return part; return part;
} }
public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) /// <summary>
{ /// Do a physics property update for a NINJA joint.
if (IsJoint()) /// </summary>
/// <param name="UsePhysics"></param>
/// <param name="isNew"></param>
protected void DoPhysicsPropertyUpdateForNinjaJoint(bool UsePhysics, bool isNew)
{ {
if (UsePhysics) if (UsePhysics)
{ {
@ -1841,6 +1844,18 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
/// <summary>
/// Do a physics propery update for this part.
/// </summary>
/// <param name="UsePhysics"></param>
/// <param name="isNew"></param>
public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew)
{
if (IsJoint())
{
DoPhysicsPropertyUpdateForNinjaJoint(UsePhysics, isNew);
}
else else
{ {
if (PhysActor != null) if (PhysActor != null)
@ -4699,7 +4714,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </remarks> /// </remarks>
public void CheckSculptAndLoad() public void CheckSculptAndLoad()
{ {
// m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId);
if (ParentGroup.IsDeleted) if (ParentGroup.IsDeleted)
return; return;