Rope aplies forcce to both players
authorsaiam
Tue, 09 Dec 2008 00:45:18 +0000
changeset 336 ef598a3dc1b7
parent 335 47dc65c8df71
child 337 ecde18d07879
Rope aplies forcce to both players
src/PhysicsObject.cc
--- a/src/PhysicsObject.cc	Tue Dec 09 00:10:32 2008 +0000
+++ b/src/PhysicsObject.cc	Tue Dec 09 00:45:18 2008 +0000
@@ -131,6 +131,9 @@
     // a force towards that
     if (pivot != NULL) {
         applyForce(getPivotForce());
+        if (pivot->type == PLAYER) {
+            pivot->applyForce(getPivotForce()*(-1));
+        }
     }
 
     std::pair<Force, TimeMS> force;