src/Rope.cc
changeset 428 712b943195a6
parent 427 01e77fe8c040
--- a/src/Rope.cc	Sat Jan 24 00:47:54 2009 +0200
+++ b/src/Rope.cc	Sat Jan 24 01:19:38 2009 +0200
@@ -78,7 +78,9 @@
 
     // attached to something!
     state = ROPE_FIXED;
-    velocity = Vector(0,0);
+
+    // XXX: reset, except we override tick() in ugly ways
+    setVelocity(Vector(0,0));
         
     // Ropes location will be used as the pivot point, so move the location to the collisionPoint.
     // Currently the position is something like one pixel away from the collisionPoint where there isn't ground.
@@ -204,7 +206,7 @@
             return;
 
         // If there's no ground on the pivot point anymore, release the rope
-        if (!world.terrain.collides(position)) { 
+        if (!world.terrain.collides(getPosition())) { 
             // XXX: move to some new method
             state = ROPE_FLYING;
             length = ROPE_LENGTH;