src/PhysicsObject.cc
changeset 221 fbc5db6fce45
parent 211 d5d52fb191e4
child 222 293ddf4c067d
--- a/src/PhysicsObject.cc	Sat Dec 06 14:36:37 2008 +0000
+++ b/src/PhysicsObject.cc	Sat Dec 06 16:17:05 2008 +0000
@@ -7,7 +7,7 @@
 PhysicsObject::PhysicsObject (PhysicsWorld &world, float mass, 
                               Vector position, Vector velocity)
     : world(world), position(position), velocity(velocity),
-      mass(mass), inAir(true), aim(0), facingRight(true), reloadTimer(0) {
+      mass(mass), inAir(true), aim(0), facingRight(true) {
     // TODO: Is thir the right way to do this?
     //world.addPlayerObject(this);
 }
@@ -64,7 +64,7 @@
     float velocity = PLAYER_WALK_SPEED;
     float walkAmount = (velocity*dt)/1000;
     Vector reached = this->position;
-    while(walkAmount > 0 && !this->inAir) {
+    while (walkAmount > 0 && !this->inAir) {
         this->position = walk_one_step((1 < walkAmount ? 1 : walkAmount), right);
         walkAmount--;
     }
@@ -112,12 +112,6 @@
  * integration and collision detection.
  */   
 void PhysicsObject::updatePosition (TimeMS dt) {
-
-    // Reloads weapon if not reloaded
-    reloadTimer -= dt;
-    if(reloadTimer < 0)
-        reloadTimer = 0;
-
     // Add gravity to the force queue
     forceq.push(world.gravity);
     
@@ -330,10 +324,6 @@
     this->updatePosition(tick_length);
 }
 
-bool PhysicsObject::canShoot() {
-    return this->reloadTimer <= 0;
-}
-
 void PhysicsObject::draw(CL_GraphicContext *gc) {
     CL_Quad player(
                    (position+shape[0]).x, (position+shape[0]).y,