Changed dig to use removeGround again. The problem with the digging is the fact that input isn't handled properly.
authorsaiam
Sun, 07 Dec 2008 22:48:46 +0000
changeset 270 d17126e20de7
parent 269 9024e805b4e2
child 271 bf6784a95b08
Changed dig to use removeGround again. The problem with the digging is the fact that input isn't handled properly.
src/Player.cc
--- a/src/Player.cc	Sun Dec 07 22:47:24 2008 +0000
+++ b/src/Player.cc	Sun Dec 07 22:48:46 2008 +0000
@@ -43,9 +43,10 @@
 void Player::handleDig (Vector position, float radius) {
     // XXX: clean this bit up
     // calculate new position and velocity
-    Vector shotPosition = position + getDirection() * PROJECTILE_START_DISTANCE;
+    Vector digPosition = position + getDirection() * PROJECTILE_START_DISTANCE;
+    world.removeGround(digPosition, radius);
     // execute
-    new Projectile(state, shotPosition, Vector(0, 0), false, radius, 1);
+    //    new Projectile(state, shotPosition, Vector(0, 0), false, radius, 0);
 }
 
 void Player::handleCreateProjectile (Weapon *weapon, Vector position, Vector velocity) {