digging
authornireco
Fri, 28 Nov 2008 13:17:43 +0000
changeset 117 2877eef6c1d5
parent 116 0d36aade845e
child 118 561165de7452
digging
src/proto2/GameState.cc
--- a/src/proto2/GameState.cc	Fri Nov 28 13:11:51 2008 +0000
+++ b/src/proto2/GameState.cc	Fri Nov 28 13:17:43 2008 +0000
@@ -31,6 +31,15 @@
     // Apply force
     applyForce(Vector(fx, 0), INPUT_INTERVAL_MS);
 
+    // dig/shoot or something
+    if (input & INPUT_MOVE_DIG) {
+        // Should create Shot which destroys ground, but also should be destroyed then,
+        // but it doesn't.
+        // But this now just segfaults
+//        world.addObject(new Shot(state, position, true));
+
+        world.removeGround(position, 10);
+    }
 }
 
 void Player::debugInfo (void) {