Browse Source

Merge pull request #55 from capnlove/development

Fixed Sceneobject.applyForce - argument count mismatch
Fixed Sceneobject.applyLinearImpulse - argument count mismatch
Simon Love 12 years ago
parent
commit
b6ab4805de
1 changed files with 5 additions and 3 deletions
  1. 5 3
      engine/source/2d/sceneobject/SceneObject_ScriptBinding.h

+ 5 - 3
engine/source/2d/sceneobject/SceneObject_ScriptBinding.h

@@ -1784,7 +1784,7 @@ ConsoleMethod(SceneObject, isRotateToComplete, bool, 2, 2,   "() - Gets whether
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod(SceneObject, applyForce, void, 4, 6,       "(worldForce X/Y, [worldPoint X/Y]) - Applies a force at a world point.\n"
+ConsoleMethod(SceneObject, applyForce, void, 3, 6,       "(worldForce X/Y, [worldPoint X/Y]) - Applies a force at a world point.\n"
                                                             "If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity.\n"
                                                             "@param worldForceX/Y - The world force vector in Newtons (N)."
                                                             "@param worldPointX/Y - The world point where the force is applied.  If world point is not specified, the center of mass is used."
@@ -1816,6 +1816,7 @@ ConsoleMethod(SceneObject, applyForce, void, 4, 6,       "(worldForce X/Y, [worl
     {
         // Apply force.
         object->applyForce( worldForce );
+		return;
     }
 
     // World point.
@@ -1835,7 +1836,7 @@ ConsoleMethod(SceneObject, applyForce, void, 4, 6,       "(worldForce X/Y, [worl
     // Invalid
     else
     {
-        Con::warnf("Scene::applyForce() - Invalid number of parameters!");
+		Con::warnf("Scene::applyForce() - Invalid number of parameters!");
         return;
     }
 
@@ -1859,7 +1860,7 @@ ConsoleMethod(SceneObject, applyTorque, void, 3, 3,      "(torque) - Applies a t
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod(SceneObject, applyLinearImpulse, void, 4, 6,   "(worldImpulse X/Y, [worldPoint X/Y]) - Applies an impulse at a world point.\n"
+ConsoleMethod(SceneObject, applyLinearImpulse, void, 3, 6,   "(worldImpulse X/Y, [worldPoint X/Y]) - Applies an impulse at a world point.\n"
                                                                 "This immediately modifies the linear velocity.  It also modifies the angular velocity if the point of application is not the center of mass.\n"
                                                                 "@param worldImpulse/Y - The world impulse vector in Newtons (N-seconds) or Kg-m/s."
                                                                 "@param worldPointX/Y - The world point where the force is applied.  If world point is not specified, the center of mass is used."
@@ -1891,6 +1892,7 @@ ConsoleMethod(SceneObject, applyLinearImpulse, void, 4, 6,   "(worldImpulse X/Y,
     {
         // Apply force.
         object->applyForce( worldImpulse );
+		return;
     }
 
     // World point.