src/Player.cc
changeset 225 22ecb9cb9245
parent 223 2fcaf54ed37b
child 229 355e46effa41
--- a/src/Player.cc	Sat Dec 06 19:14:58 2008 +0000
+++ b/src/Player.cc	Sat Dec 06 19:38:01 2008 +0000
@@ -19,7 +19,7 @@
 
 Player::Player(GameState &state, Vector position, bool visible) : 
     PhysicsObject(state.world, PLAYER_MASS, position, Vector(0, 0)), state(state), visible(visible), arsenal(),
-    selectedWeapon(0), changing(false), animation_step(0) //, rope(*this) 
+    selectedWeapon(0), changing(false), animation_step(0), rope(*this) 
 {
     // TODO: arsenal's size should be affected by some value
     // and weapons should be loaded from somewhere, not generated here
@@ -154,6 +154,9 @@
     if (input & INPUT_SHOOT && getWeapon().canShoot())
         fireWeapon(getWeapon());
     
+    if (input & INPUT_ROPE)
+        rope.shoot();
+
     // XXX: how should this be written?
     if (move_force.x != 0) 
         animation_step = (animation_step + 1) % img_num_step;