Browse Source

- Fixed up some formatting issues only.

MelvMay-GG 12 years ago
parent
commit
aa5da47

+ 14 - 14
engine/source/2d/controllers/BuoyancyController.h

@@ -41,26 +41,26 @@ private:
     /// The fluid area.
     b2AABB mFluidArea;
 
-	/// The fluid density.
-	F32 mFluidDensity;
+    /// The fluid density.
+    F32 mFluidDensity;
 
-	/// Fluid flow velocity for drag calculations.
-	Vector2 mFlowVelocity;
+    /// Fluid flow velocity for drag calculations.
+    Vector2 mFlowVelocity;
 
-	/// Linear drag co-efficient.
-	F32 mLinearDrag;
+    /// Linear drag co-efficient.
+    F32 mLinearDrag;
 
-	/// Linear drag co-efficient.
-	F32 mAngularDrag;
+    /// Linear drag co-efficient.
+    F32 mAngularDrag;
 
-	/// Gravity to use inside the fluid.
-	Vector2 mFluidGravity;
+    /// Gravity to use inside the fluid.
+    Vector2 mFluidGravity;
 
-	/// Whether to use the collision shape densities or assume a uniform density.
-	bool mUseShapeDensity;
+    /// Whether to use the collision shape densities or assume a uniform density.
+    bool mUseShapeDensity;
 
-	/// The outer fluid surface normal.
-	Vector2 mSurfaceNormal;
+    /// The outer fluid surface normal.
+    Vector2 mSurfaceNormal;
 
 protected:
     F32 ComputeCircleSubmergedArea( const b2Transform& bodyTransform, const b2CircleShape* pShape, Vector2& center );

+ 4 - 4
engine/source/2d/controllers/PointForceController.h

@@ -50,11 +50,11 @@ private:
     /// Whether to apply the force non-linearly (using the inverse square law) or linearly.
     bool mNonLinear;
 
-	/// Linear drag co-efficient.
-	F32 mLinearDrag;
+    /// Linear drag co-efficient.
+    F32 mLinearDrag;
 
-	/// Linear drag co-efficient.
-	F32 mAngularDrag;
+    /// Linear drag co-efficient.
+    F32 mAngularDrag;
 
     /// Tracked object.
     SimObjectPtr<SceneObject> mTrackedObject;

+ 376 - 376
engine/source/2d/scene/Scene.cc

@@ -237,7 +237,7 @@ Scene::Scene() :
         jointMotorMaxTorqueName           = jointRevoluteMotorMaxTorqueName;
         jointMotorCorrectionFactorName    = StringTable->insert( "CorrectionFactor" );
 
-		controllerCustomNodeName	  = StringTable->insert( "Controllers" );
+        controllerCustomNodeName	      = StringTable->insert( "Controllers" );
 
         // Flag as initialized.
         tamlPropertiesInitialized = true;
@@ -256,7 +256,7 @@ Scene::Scene() :
     // Set debug stats for batch renderer.
     mBatchRenderer.setDebugStats( &mDebugStats );
 
-	// Register the scene controllers set.
+    // Register the scene controllers set.
     mControllers = new SimSet();
     mControllers->registerObject();
 
@@ -271,7 +271,7 @@ Scene::Scene() :
 
 Scene::~Scene()
 {
-	// Unregister the scene controllers set.
+    // Unregister the scene controllers set.
     mControllers->deleteObject();
 
     // Decrease scene count.
@@ -610,12 +610,12 @@ void Scene::dispatchBeginContactCallbacks( void )
                 normalImpulse1,
                 tangentImpulse1 );
         }
-		else
-		{
+        else
+        {
             dSprintf(pMiscInfoBuffer, 64,
                 "%d %d",
                 shapeIndexA, shapeIndexB );
-		}
+        }
 
         // Does the scene handle the collision callback?
         Namespace* pNamespace = getNamespace();
@@ -869,10 +869,10 @@ void Scene::processTick( void )
         // Debug Status Reference.
         DebugStats* pDebugStats = &mDebugStats;
 
-		// Fetch ticked scene object count.
-		const S32 tickedSceneObjectCount = mTickedSceneObjects.size();
+        // Fetch ticked scene object count.
+        const S32 tickedSceneObjectCount = mTickedSceneObjects.size();
 
-		// ****************************************************
+        // ****************************************************
         // Pre-integrate objects.
         // ****************************************************
 
@@ -887,7 +887,7 @@ void Scene::processTick( void )
         }
 
         // ****************************************************
-		// Integrate controllers.
+        // Integrate controllers.
         // ****************************************************
 
         // Fetch the controller set.
@@ -899,22 +899,22 @@ void Scene::processTick( void )
             // Debug Profiling.
             PROFILE_SCOPE(Scene_IntegrateSceneControllers);
 
-		    // Yes, so fetch scene controller count.
-		    const S32 sceneControllerCount = (S32)pControllerSet->size();
+            // Yes, so fetch scene controller count.
+            const S32 sceneControllerCount = (S32)pControllerSet->size();
 
-		    // Iterate scene controllers.
-		    for( S32 i = 0; i < sceneControllerCount; i++ )
-		    {
-			    // Fetch the scene controller.
-			    SceneController* pController = dynamic_cast<SceneController*>((*pControllerSet)[i]);
+            // Iterate scene controllers.
+            for( S32 i = 0; i < sceneControllerCount; i++ )
+            {
+                // Fetch the scene controller.
+                SceneController* pController = dynamic_cast<SceneController*>((*pControllerSet)[i]);
 
-			    // Skip if not a controller.
-			    if ( pController == NULL )
-				    continue;
+                // Skip if not a controller.
+                if ( pController == NULL )
+                    continue;
 
-			    // Integrate.
-			    pController->integrate( this, mSceneTime, Tickable::smTickSec, pDebugStats );
-		    }
+                // Integrate.
+                pController->integrate( this, mSceneTime, Tickable::smTickSec, pDebugStats );
+            }
         }
 
         // Debug Profiling.
@@ -1001,11 +1001,11 @@ void Scene::interpolateTick( F32 timeDelta )
     PROFILE_SCOPE(Scene_InterpolateTick);
 
     // ****************************************************
-	// Interpolate scene objects.
+    // Interpolate scene objects.
     // ****************************************************
 
-	// Fetch the scene object count.
-	const S32 sceneObjectCount = mSceneObjects.size();
+    // Fetch the scene object count.
+    const S32 sceneObjectCount = mSceneObjects.size();
 
     // Iterate scene objects.
     for( S32 n = 0; n < sceneObjectCount; ++n )
@@ -1309,22 +1309,22 @@ void Scene::sceneRender( const SceneRenderState* pSceneRenderState )
             // Debug Profiling.
             PROFILE_SCOPE(Scene_RenderControllers);
 
-		    // Yes, so fetch scene controller count.
-		    const S32 sceneControllerCount = (S32)pControllerSet->size();
+            // Yes, so fetch scene controller count.
+            const S32 sceneControllerCount = (S32)pControllerSet->size();
 
-		    // Iterate scene controllers.
-		    for( S32 i = 0; i < sceneControllerCount; i++ )
-		    {
-			    // Fetch the scene controller.
-			    SceneController* pController = dynamic_cast<SceneController*>((*pControllerSet)[i]);
+            // Iterate scene controllers.
+            for( S32 i = 0; i < sceneControllerCount; i++ )
+            {
+                // Fetch the scene controller.
+                SceneController* pController = dynamic_cast<SceneController*>((*pControllerSet)[i]);
 
-			    // Skip if not a controller.
-			    if ( pController == NULL )
-				    continue;
+                // Skip if not a controller.
+                if ( pController == NULL )
+                    continue;
 
-			    // Render the overlay.
+                // Render the overlay.
                 pController->renderOverlay( this, pSceneRenderState, &mBatchRenderer );
-		    }
+            }
 
             // Flush isolated batch.
             mBatchRenderer.flush( pDebugStats->batchIsolatedFlush );
@@ -4448,8 +4448,8 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
     // Do we have any controllers?
     if ( pControllerNode != NULL )
     {
-		// Yes, so fetch the scene controllers.
-		SimSet* pControllerSet = getControllers();
+        // Yes, so fetch the scene controllers.
+        SimSet* pControllerSet = getControllers();
 
         // Fetch children controller nodes.
         const TamlCustomNodeVector& controllerChildren = pControllerNode->getChildren();
@@ -4499,442 +4499,442 @@ void Scene::onTamlCustomWrite( TamlCustomNodes& customNodes )
 
     // Do we have any joints?
     if ( jointCount > 0 )
-	{
-		// Yes, so add joint custom node.
-		TamlCustomNode* pJointCustomNode = customNodes.addNode( jointCustomNodeName );
-
-		// Iterate joints.
-		for( typeJointHash::iterator jointItr = mJoints.begin(); jointItr != mJoints.end(); ++jointItr )
-		{
-			// Fetch base joint.
-			b2Joint* pBaseJoint = jointItr->value;
-
-			// Add joint node.
-			// NOTE:    The name of the node will get updated shortly.
-			TamlCustomNode* pJointNode = pJointCustomNode->addNode( StringTable->EmptyString );
-
-			// Fetch common details.
-			b2Body* pBodyA = pBaseJoint->GetBodyA();
-			b2Body* pBodyB = pBaseJoint->GetBodyB();
-
-			// Fetch physics proxies.
-			PhysicsProxy* pPhysicsProxyA = static_cast<PhysicsProxy*>(pBodyA->GetUserData());
-			PhysicsProxy* pPhysicsProxyB = static_cast<PhysicsProxy*>(pBodyB->GetUserData());
-
-			// Fetch physics proxy type.
-			PhysicsProxy::ePhysicsProxyType proxyTypeA = static_cast<PhysicsProxy*>(pBodyA->GetUserData())->getPhysicsProxyType();
-			PhysicsProxy::ePhysicsProxyType proxyTypeB = static_cast<PhysicsProxy*>(pBodyB->GetUserData())->getPhysicsProxyType();
-
-			// Fetch scene objects.
-			SceneObject* pSceneObjectA = proxyTypeA == PhysicsProxy::PHYSIC_PROXY_SCENEOBJECT ? static_cast<SceneObject*>(pPhysicsProxyA) : NULL;
-			SceneObject* pSceneObjectB = proxyTypeB == PhysicsProxy::PHYSIC_PROXY_SCENEOBJECT ? static_cast<SceneObject*>(pPhysicsProxyB) : NULL;
-
-			// Populate joint appropriately.
-			switch( pBaseJoint->GetType() )
-			{
-				case e_distanceJoint:
-					{
-						// Set joint name.
+    {
+        // Yes, so add joint custom node.
+        TamlCustomNode* pJointCustomNode = customNodes.addNode( jointCustomNodeName );
+
+        // Iterate joints.
+        for( typeJointHash::iterator jointItr = mJoints.begin(); jointItr != mJoints.end(); ++jointItr )
+        {
+            // Fetch base joint.
+            b2Joint* pBaseJoint = jointItr->value;
+
+            // Add joint node.
+            // NOTE:    The name of the node will get updated shortly.
+            TamlCustomNode* pJointNode = pJointCustomNode->addNode( StringTable->EmptyString );
+
+            // Fetch common details.
+            b2Body* pBodyA = pBaseJoint->GetBodyA();
+            b2Body* pBodyB = pBaseJoint->GetBodyB();
+
+            // Fetch physics proxies.
+            PhysicsProxy* pPhysicsProxyA = static_cast<PhysicsProxy*>(pBodyA->GetUserData());
+            PhysicsProxy* pPhysicsProxyB = static_cast<PhysicsProxy*>(pBodyB->GetUserData());
+
+            // Fetch physics proxy type.
+            PhysicsProxy::ePhysicsProxyType proxyTypeA = static_cast<PhysicsProxy*>(pBodyA->GetUserData())->getPhysicsProxyType();
+            PhysicsProxy::ePhysicsProxyType proxyTypeB = static_cast<PhysicsProxy*>(pBodyB->GetUserData())->getPhysicsProxyType();
+
+            // Fetch scene objects.
+            SceneObject* pSceneObjectA = proxyTypeA == PhysicsProxy::PHYSIC_PROXY_SCENEOBJECT ? static_cast<SceneObject*>(pPhysicsProxyA) : NULL;
+            SceneObject* pSceneObjectB = proxyTypeB == PhysicsProxy::PHYSIC_PROXY_SCENEOBJECT ? static_cast<SceneObject*>(pPhysicsProxyB) : NULL;
+
+            // Populate joint appropriately.
+            switch( pBaseJoint->GetType() )
+            {
+                case e_distanceJoint:
+                    {
+                        // Set joint name.
                         pJointNode->setNodeName( jointDistanceNodeName );
 
-						// Fetch joint.
-						const b2DistanceJoint* pJoint = dynamic_cast<const b2DistanceJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2DistanceJoint* pJoint = dynamic_cast<const b2DistanceJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid distance joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid distance joint type returned." );
 
-						// Add length.
-						pJointNode->addField( jointDistanceLengthName, pJoint->GetLength() );
+                        // Add length.
+                        pJointNode->addField( jointDistanceLengthName, pJoint->GetLength() );
 
-						// Add frequency.
-						if ( mNotZero( pJoint->GetFrequency() ) )
-							pJointNode->addField( jointDistanceFrequencyName, pJoint->GetFrequency() );
+                        // Add frequency.
+                        if ( mNotZero( pJoint->GetFrequency() ) )
+                            pJointNode->addField( jointDistanceFrequencyName, pJoint->GetFrequency() );
 
-						// Add damping ratio.
-						if ( mNotZero( pJoint->GetDampingRatio() ) )
-							pJointNode->addField( jointDistanceDampingRatioName, pJoint->GetDampingRatio() );
+                        // Add damping ratio.
+                        if ( mNotZero( pJoint->GetDampingRatio() ) )
+                            pJointNode->addField( jointDistanceDampingRatioName, pJoint->GetDampingRatio() );
 
-						// Add local anchors.
-						if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+                        // Add local anchors.
+                        if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_ropeJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointRopeNodeName );
+                case e_ropeJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointRopeNodeName );
 
-						// Fetch joint.
-						const b2RopeJoint* pJoint = dynamic_cast<const b2RopeJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2RopeJoint* pJoint = dynamic_cast<const b2RopeJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid rope joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid rope joint type returned." );
 
-						// Add max length.
-						if ( mNotZero( pJoint->GetMaxLength() ) )
-							pJointNode->addField( jointRopeMaxLengthName, pJoint->GetMaxLength() );
+                        // Add max length.
+                        if ( mNotZero( pJoint->GetMaxLength() ) )
+                            pJointNode->addField( jointRopeMaxLengthName, pJoint->GetMaxLength() );
 
-						// Add local anchors.
-						if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+                        // Add local anchors.
+                        if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
-
-				case e_revoluteJoint:
-					{
-						// Set join name.
-						pJointNode->setNodeName( jointRevoluteNodeName );
-
-						// Fetch joint.
-						const b2RevoluteJoint* pJoint = dynamic_cast<const b2RevoluteJoint*>( pBaseJoint );
-
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid revolute joint type returned." );
-
-						// Add limit.
-						if ( pJoint->IsLimitEnabled() )
-						{
-							// Add limits.
-							pJointNode->addField( jointRevoluteLimitLowerAngleName, mRadToDeg(pJoint->GetLowerLimit()) );
-							pJointNode->addField( jointRevoluteLimitUpperAngleName, mRadToDeg(pJoint->GetUpperLimit()) );
-						}
-
-						// Add motor.
-						if ( pJoint->IsMotorEnabled() )
-						{
-							// Add motor.
-							pJointNode->addField( jointRevoluteMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
-							pJointNode->addField( jointRevoluteMotorMaxTorqueName, pJoint->GetMaxMotorTorque() );
-						}
-
-						// Add local anchors.
-						if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
-
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                    }
+                    break;
+
+                case e_revoluteJoint:
+                    {
+                        // Set join name.
+                        pJointNode->setNodeName( jointRevoluteNodeName );
+
+                        // Fetch joint.
+                        const b2RevoluteJoint* pJoint = dynamic_cast<const b2RevoluteJoint*>( pBaseJoint );
+
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid revolute joint type returned." );
+
+                        // Add limit.
+                        if ( pJoint->IsLimitEnabled() )
+                        {
+                            // Add limits.
+                            pJointNode->addField( jointRevoluteLimitLowerAngleName, mRadToDeg(pJoint->GetLowerLimit()) );
+                            pJointNode->addField( jointRevoluteLimitUpperAngleName, mRadToDeg(pJoint->GetUpperLimit()) );
+                        }
+
+                        // Add motor.
+                        if ( pJoint->IsMotorEnabled() )
+                        {
+                            // Add motor.
+                            pJointNode->addField( jointRevoluteMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
+                            pJointNode->addField( jointRevoluteMotorMaxTorqueName, pJoint->GetMaxMotorTorque() );
+                        }
+
+                        // Add local anchors.
+                        if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_weldJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointWeldNodeName );
+                case e_weldJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointWeldNodeName );
 
-						// Fetch joint.
-						const b2WeldJoint* pJoint = dynamic_cast<const b2WeldJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2WeldJoint* pJoint = dynamic_cast<const b2WeldJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid weld joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid weld joint type returned." );
 
-						// Add frequency.
-						if ( mNotZero( pJoint->GetFrequency() ) )
-							pJointNode->addField( jointWeldFrequencyName, pJoint->GetFrequency() );
+                        // Add frequency.
+                        if ( mNotZero( pJoint->GetFrequency() ) )
+                            pJointNode->addField( jointWeldFrequencyName, pJoint->GetFrequency() );
 
-						// Add damping ratio.
-						if ( mNotZero( pJoint->GetDampingRatio() ) )
-							pJointNode->addField( jointWeldDampingRatioName, pJoint->GetDampingRatio() );
+                        // Add damping ratio.
+                        if ( mNotZero( pJoint->GetDampingRatio() ) )
+                            pJointNode->addField( jointWeldDampingRatioName, pJoint->GetDampingRatio() );
 
-						// Add local anchors.
-						if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+                        // Add local anchors.
+                        if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_wheelJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointWheelNodeName );
+                case e_wheelJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointWheelNodeName );
 
-						// Fetch joint.
-						b2WheelJoint* pJoint = dynamic_cast<b2WheelJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        b2WheelJoint* pJoint = dynamic_cast<b2WheelJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid wheel joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid wheel joint type returned." );
 
-						// Add motor.
-						if ( pJoint->IsMotorEnabled() )
-						{
-							// Add motor.
-							pJointNode->addField( jointWheelMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
-							pJointNode->addField( jointWheelMotorMaxTorqueName, pJoint->GetMaxMotorTorque() );
-						}
+                        // Add motor.
+                        if ( pJoint->IsMotorEnabled() )
+                        {
+                            // Add motor.
+                            pJointNode->addField( jointWheelMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
+                            pJointNode->addField( jointWheelMotorMaxTorqueName, pJoint->GetMaxMotorTorque() );
+                        }
 
-						// Add frequency.
-						if ( mNotZero( pJoint->GetSpringFrequencyHz() ) )
-							pJointNode->addField( jointWheelFrequencyName, pJoint->GetSpringFrequencyHz() );
+                        // Add frequency.
+                        if ( mNotZero( pJoint->GetSpringFrequencyHz() ) )
+                            pJointNode->addField( jointWheelFrequencyName, pJoint->GetSpringFrequencyHz() );
 
-						// Add damping ratio.
-						if ( mNotZero( pJoint->GetSpringDampingRatio() ) )
-							pJointNode->addField( jointWheelDampingRatioName, pJoint->GetSpringDampingRatio() );
+                        // Add damping ratio.
+                        if ( mNotZero( pJoint->GetSpringDampingRatio() ) )
+                            pJointNode->addField( jointWheelDampingRatioName, pJoint->GetSpringDampingRatio() );
 
-						// Add world axis.
-						pJointNode->addField( jointWheelWorldAxisName, pJoint->GetBodyA()->GetWorldVector( pJoint->GetLocalAxisA() ) );
+                        // Add world axis.
+                        pJointNode->addField( jointWheelWorldAxisName, pJoint->GetBodyA()->GetWorldVector( pJoint->GetLocalAxisA() ) );
 
-						// Add local anchors.
-						pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+                        // Add local anchors.
+                        pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_frictionJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointFrictionNodeName );
+                case e_frictionJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointFrictionNodeName );
 
-						// Fetch joint.
-						const b2FrictionJoint* pJoint = dynamic_cast<const b2FrictionJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2FrictionJoint* pJoint = dynamic_cast<const b2FrictionJoint*>( pBaseJoint );
 
-						// Add max force.
-						if ( mNotZero( pJoint->GetMaxForce() ) )
-							pJointNode->addField( jointFrictionMaxForceName, pJoint->GetMaxForce() );
+                        // Add max force.
+                        if ( mNotZero( pJoint->GetMaxForce() ) )
+                            pJointNode->addField( jointFrictionMaxForceName, pJoint->GetMaxForce() );
 
-						// Add max torque.
-						if ( mNotZero( pJoint->GetMaxTorque() ) )
-							pJointNode->addField( jointFrictionMaxTorqueName, pJoint->GetMaxTorque() );
+                        // Add max torque.
+                        if ( mNotZero( pJoint->GetMaxTorque() ) )
+                            pJointNode->addField( jointFrictionMaxTorqueName, pJoint->GetMaxTorque() );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid friction joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid friction joint type returned." );
 
-						// Add local anchors.
-						if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
-							pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+                        // Add local anchors.
+                        if ( mNotZero( pJoint->GetLocalAnchorA().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        if ( mNotZero( pJoint->GetLocalAnchorB().LengthSquared() ) )
+                            pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
-
-				case e_prismaticJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointPrismaticNodeName );
-
-						// Fetch joint.
-						b2PrismaticJoint* pJoint = dynamic_cast<b2PrismaticJoint*>( pBaseJoint );
-
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid prismatic joint type returned." );
-
-						// Add limit.
-						if ( pJoint->IsLimitEnabled() )
-						{
-							// Add limits.
-							pJointNode->addField( jointPrismaticLimitLowerTransName, pJoint->GetLowerLimit() );
-							pJointNode->addField( jointPrismaticLimitUpperTransName, pJoint->GetUpperLimit() );
-						}
-
-						// Add motor.
-						if ( pJoint->IsMotorEnabled() )
-						{
-							// Add motor.
-							pJointNode->addField( jointPrismaticMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
-							pJointNode->addField( jointPrismaticMotorMaxForceName, pJoint->GetMaxMotorForce() );
-						}
-
-						// Add world axis.
-						pJointNode->addField( jointPrismaticWorldAxisName, pJoint->GetBodyA()->GetWorldVector( pJoint->GetLocalAxisA() ) );
-
-						// Add local anchors.
-						pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
-						pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
-
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                    }
+                    break;
+
+                case e_prismaticJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointPrismaticNodeName );
+
+                        // Fetch joint.
+                        b2PrismaticJoint* pJoint = dynamic_cast<b2PrismaticJoint*>( pBaseJoint );
+
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid prismatic joint type returned." );
+
+                        // Add limit.
+                        if ( pJoint->IsLimitEnabled() )
+                        {
+                            // Add limits.
+                            pJointNode->addField( jointPrismaticLimitLowerTransName, pJoint->GetLowerLimit() );
+                            pJointNode->addField( jointPrismaticLimitUpperTransName, pJoint->GetUpperLimit() );
+                        }
+
+                        // Add motor.
+                        if ( pJoint->IsMotorEnabled() )
+                        {
+                            // Add motor.
+                            pJointNode->addField( jointPrismaticMotorSpeedName, mRadToDeg(pJoint->GetMotorSpeed()) );
+                            pJointNode->addField( jointPrismaticMotorMaxForceName, pJoint->GetMaxMotorForce() );
+                        }
+
+                        // Add world axis.
+                        pJointNode->addField( jointPrismaticWorldAxisName, pJoint->GetBodyA()->GetWorldVector( pJoint->GetLocalAxisA() ) );
+
+                        // Add local anchors.
+                        pJointNode->addField( jointLocalAnchorAName, pJoint->GetLocalAnchorA() );
+                        pJointNode->addField( jointLocalAnchorBName, pJoint->GetLocalAnchorB() );
+
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_pulleyJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointPulleyNodeName );
+                case e_pulleyJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointPulleyNodeName );
 
-						// Fetch joint.
-						b2PulleyJoint* pJoint = dynamic_cast<b2PulleyJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        b2PulleyJoint* pJoint = dynamic_cast<b2PulleyJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid pulley joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid pulley joint type returned." );
 
-						// Add lengths.
-						pJointNode->addField( jointPulleyLengthAName, pJoint->GetLengthA() );
-						pJointNode->addField( jointPulleyLengthBName, pJoint->GetLengthB() );
+                        // Add lengths.
+                        pJointNode->addField( jointPulleyLengthAName, pJoint->GetLengthA() );
+                        pJointNode->addField( jointPulleyLengthBName, pJoint->GetLengthB() );
 
-						// Add ratio,
-						pJointNode->addField( jointPulleyRatioName, pJoint->GetRatio() );
+                        // Add ratio,
+                        pJointNode->addField( jointPulleyRatioName, pJoint->GetRatio() );
 
-						// Add ground anchors.
-						pJointNode->addField( jointPulleyGroundAnchorAName, pJoint->GetGroundAnchorA() );
-						pJointNode->addField( jointPulleyGroundAnchorBName, pJoint->GetGroundAnchorB() );
+                        // Add ground anchors.
+                        pJointNode->addField( jointPulleyGroundAnchorAName, pJoint->GetGroundAnchorA() );
+                        pJointNode->addField( jointPulleyGroundAnchorBName, pJoint->GetGroundAnchorB() );
 
-						// Add local anchors.
-						pJointNode->addField( jointLocalAnchorAName, pJoint->GetBodyA()->GetLocalPoint( pJoint->GetAnchorA() ) );
-						pJointNode->addField( jointLocalAnchorBName, pJoint->GetBodyB()->GetLocalPoint( pJoint->GetAnchorB() ) );
+                        // Add local anchors.
+                        pJointNode->addField( jointLocalAnchorAName, pJoint->GetBodyA()->GetLocalPoint( pJoint->GetAnchorA() ) );
+                        pJointNode->addField( jointLocalAnchorBName, pJoint->GetBodyB()->GetLocalPoint( pJoint->GetAnchorB() ) );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_mouseJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointTargetNodeName );
+                case e_mouseJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointTargetNodeName );
 
-						// Fetch joint.
-						const b2MouseJoint* pJoint = dynamic_cast<const b2MouseJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2MouseJoint* pJoint = dynamic_cast<const b2MouseJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid target joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid target joint type returned." );
 
-						// Add target.
-						pJointNode->addField( jointTargetWorldTargetName, pJoint->GetTarget() );
+                        // Add target.
+                        pJointNode->addField( jointTargetWorldTargetName, pJoint->GetTarget() );
 
-						// Add max force.
-						pJointNode->addField( jointTargetMaxForceName, pJoint->GetMaxForce() );
+                        // Add max force.
+                        pJointNode->addField( jointTargetMaxForceName, pJoint->GetMaxForce() );
 
-						// Add frequency
-						pJointNode->addField( jointTargetFrequencyName, pJoint->GetFrequency() );
+                        // Add frequency
+                        pJointNode->addField( jointTargetFrequencyName, pJoint->GetFrequency() );
 
-						// Add damping ratio.
-						pJointNode->addField( jointTargetDampingRatioName, pJoint->GetDampingRatio() );
+                        // Add damping ratio.
+                        pJointNode->addField( jointTargetDampingRatioName, pJoint->GetDampingRatio() );
 
-						// Add body.
-						// NOTE: This joint uses BODYB as the object, BODYA is the ground-body however for easy of use
-						// we'll refer to this as OBJECTA in the persisted format.
-						if ( pSceneObjectB != NULL )
+                        // Add body.
+                        // NOTE: This joint uses BODYB as the object, BODYA is the ground-body however for easy of use
+                        // we'll refer to this as OBJECTA in the persisted format.
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
+                    }
+                    break;
 
-				case e_motorJoint:
-					{
-						// Set joint name.
-						pJointNode->setNodeName( jointMotorNodeName );
+                case e_motorJoint:
+                    {
+                        // Set joint name.
+                        pJointNode->setNodeName( jointMotorNodeName );
 
-						// Fetch joint.
-						const b2MotorJoint* pJoint = dynamic_cast<const b2MotorJoint*>( pBaseJoint );
+                        // Fetch joint.
+                        const b2MotorJoint* pJoint = dynamic_cast<const b2MotorJoint*>( pBaseJoint );
 
-						// Sanity!
-						AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid motor joint type returned." );
+                        // Sanity!
+                        AssertFatal( pJoint != NULL, "Scene::onTamlCustomWrite() - Invalid motor joint type returned." );
 
-						// Add linear offset.
-						if ( mNotZero( pJoint->GetLinearOffset().LengthSquared() ) )
-							pJointNode->addField( jointMotorLinearOffsetName, pJoint->GetLinearOffset() );
+                        // Add linear offset.
+                        if ( mNotZero( pJoint->GetLinearOffset().LengthSquared() ) )
+                            pJointNode->addField( jointMotorLinearOffsetName, pJoint->GetLinearOffset() );
 
-						// Add angular offset.
-						if ( mNotZero( pJoint->GetAngularOffset() ) )
-							pJointNode->addField( jointMotorAngularOffsetName, mRadToDeg( pJoint->GetAngularOffset() ) );
+                        // Add angular offset.
+                        if ( mNotZero( pJoint->GetAngularOffset() ) )
+                            pJointNode->addField( jointMotorAngularOffsetName, mRadToDeg( pJoint->GetAngularOffset() ) );
 
-						// Add max force.
-						pJointNode->addField( jointMotorMaxForceName, pJoint->GetMaxForce() );
+                        // Add max force.
+                        pJointNode->addField( jointMotorMaxForceName, pJoint->GetMaxForce() );
 
-						// Add max torque.
-						pJointNode->addField( jointMotorMaxTorqueName, pJoint->GetMaxTorque() );
+                        // Add max torque.
+                        pJointNode->addField( jointMotorMaxTorqueName, pJoint->GetMaxTorque() );
 
-						// Add correction factor.
-						pJointNode->addField( jointMotorCorrectionFactorName, pJoint->GetCorrectionFactor() );
+                        // Add correction factor.
+                        pJointNode->addField( jointMotorCorrectionFactorName, pJoint->GetCorrectionFactor() );
 
-						// Add scene object bodies.
-						if ( pSceneObjectA != NULL )
+                        // Add scene object bodies.
+                        if ( pSceneObjectA != NULL )
                             pJointNode->addNode( pSceneObjectA );
 
-						if ( pSceneObjectB != NULL )
+                        if ( pSceneObjectB != NULL )
                             pJointNode->addNode( pSceneObjectB );
-					}
-					break;
-
-			default:
-				// Sanity!
-				AssertFatal( false, "Scene::onTamlCustomWrite() - Unknown joint type detected." );
-			}
-
-			// Add collide connected flag.
-			if ( pBaseJoint->GetCollideConnected() )
-				pJointNode->addField( jointCollideConnectedName, pBaseJoint->GetCollideConnected() );
-		}
-	}
-
-	// Fetch controller count.
-	const S32 sceneControllerCount = getControllers() ? getControllers()->size() : 0;
-	
-	// Do we have any scene controllers?
-	if ( sceneControllerCount > 0 )
-	{
-		// Yes, so add controller node.
+                    }
+                    break;
+
+            default:
+                // Sanity!
+                AssertFatal( false, "Scene::onTamlCustomWrite() - Unknown joint type detected." );
+            }
+
+            // Add collide connected flag.
+            if ( pBaseJoint->GetCollideConnected() )
+                pJointNode->addField( jointCollideConnectedName, pBaseJoint->GetCollideConnected() );
+        }
+    }
+
+    // Fetch controller count.
+    const S32 sceneControllerCount = getControllers() ? getControllers()->size() : 0;
+    
+    // Do we have any scene controllers?
+    if ( sceneControllerCount > 0 )
+    {
+        // Yes, so add controller node.
         TamlCustomNode* pControllerCustomNode = customNodes.addNode( controllerCustomNodeName );
 
-		// Fetch the scene controllers.
-		SimSet* pControllerSet = getControllers();
+        // Fetch the scene controllers.
+        SimSet* pControllerSet = getControllers();
 
-		// Iterate scene controllers.
-		for( S32 i = 0; i < sceneControllerCount; i++ )
-		{
+        // Iterate scene controllers.
+        for( S32 i = 0; i < sceneControllerCount; i++ )
+        {
             // Fetch the set object.
             SimObject* pSetObject = pControllerSet->at(i);
 
-			// Skip if not a controller.
+            // Skip if not a controller.
             if ( !pSetObject->isType<SceneController*>() )
-				continue;
+                continue;
 
             // Add controller node.
             pControllerCustomNode->addNode( pSetObject );
-		}
-	}
+        }
+    }
 }
 
 //-----------------------------------------------------------------------------

+ 3 - 3
engine/source/2d/scene/Scene.h

@@ -221,8 +221,8 @@ private:
     typeReverseJointHash        mReverseJoints;
     U32                         mJointMasterId;
 
-	/// Scene controllers.
-	SimObjectPtr<SimSet>	    mControllers;
+    /// Scene controllers.
+    SimObjectPtr<SimSet>	    mControllers;
 
     /// Scene time.
     F32                         mSceneTime;
@@ -343,7 +343,7 @@ public:
 
     void                    mergeScene( const Scene* pScene );
 
-	inline SimSet*			getControllers( void )						{ return mControllers; }
+    inline SimSet*			getControllers( void )						{ return mControllers; }
 
     /// Scene time.
     inline F32              getSceneTime( void ) const                  { return mSceneTime; };

+ 29 - 29
engine/source/2d/scene/Scene_ScriptBinding.h

@@ -269,7 +269,7 @@ ConsoleMethod(Scene, mergeScene, void, 3, 3,    "(scene) Merges the specified sc
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, getControllers, const char*, 2, 2,	"() Gets the Scene Controllers.\n"
-														"@return Gets the scene controllers.")
+                                                        "@return Gets the scene controllers.")
 {
     // Fetch the scene controllers.
     SimSet* pControllerSet = object->getControllers();
@@ -369,9 +369,9 @@ ConsoleMethod(Scene, createDistanceJoint, S32, 4, 12,   "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -583,9 +583,9 @@ ConsoleMethod(Scene, createRopeJoint, S32, 4, 10,       "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -720,9 +720,9 @@ ConsoleMethod(Scene, createRevoluteJoint, S32, 4, 9,    "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -915,9 +915,9 @@ ConsoleMethod(Scene, createWeldJoint, S32, 4, 11,       "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -1091,9 +1091,9 @@ ConsoleMethod(Scene, createWheelJoint, S32, 7, 11,      "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -1310,9 +1310,9 @@ ConsoleMethod(Scene, createFrictionJoint, S32, 4, 11,   "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -1481,9 +1481,9 @@ ConsoleMethod(Scene, createPrismaticJoint, S32, 7, 11,  "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -1688,9 +1688,9 @@ ConsoleMethod(Scene, createPulleyJoint, S32, 9, 16,     "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
@@ -1824,7 +1824,7 @@ ConsoleMethod(Scene, createTargetJoint, S32, 5, 10,     "(sceneObject, worldTarg
                                                         "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                         "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object.
+    // Fetch scene object.
     SceneObject* pSceneObject = Sim::findObject<SceneObject>(argv[2]);
 
     // Check scene object.
@@ -2015,9 +2015,9 @@ ConsoleMethod(Scene, createMotorJoint, S32, 4, 11,      "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-	// Fetch scene object references.
-	const char* sceneObjectA = argv[2];
-	const char* sceneObjectB = argv[3];
+    // Fetch scene object references.
+    const char* sceneObjectA = argv[2];
+    const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;