# HG changeset patch # User saiam # Date 1227886071 0 # Node ID 16a73ebca81029a6789329601f190b532385a97a # Parent 0d34c0dce83cc95a19b62db5245428eb66ff6c70 No warnings anymore, but well have to think about that applyForce diff -r 0d34c0dce83c -r 16a73ebca810 src/proto2/GameState.cc --- a/src/proto2/GameState.cc Fri Nov 28 15:14:39 2008 +0000 +++ b/src/proto2/GameState.cc Fri Nov 28 15:27:51 2008 +0000 @@ -29,7 +29,7 @@ else if (fx > 0) setFacing(true); // Apply force - applyForce(Vector(fx, 0), INPUT_INTERVAL_MS); + applyForce(Vector(fx, 0)); // dig/shoot or something if (input & INPUT_MOVE_DIG) { diff -r 0d34c0dce83c -r 16a73ebca810 src/proto2/Physics.cc --- a/src/proto2/Physics.cc Fri Nov 28 15:14:39 2008 +0000 +++ b/src/proto2/Physics.cc Fri Nov 28 15:27:51 2008 +0000 @@ -36,7 +36,7 @@ } PhysicsObject::PhysicsObject (PhysicsWorld &world, float mass, Vector position, Vector velocity) - : world(world), mass(mass), position(position), velocity(velocity), facing(3), inAir(true) { + : world(world), mass(mass), position(position), velocity(velocity), inAir(true), facing(3) { world.addObject(this); } @@ -280,8 +280,8 @@ assert(hit != prev); int dirIdx = getDirectionIndex(prev-hit); - float tmp1 = hit.x-prev.x; - float tmp2 = hit.y-prev.y; + //float tmp1 = hit.x-prev.x; + //float tmp2 = hit.y-prev.y; // Engine::log(DEBUG, "physics.getNormal ") << dirIdx << " " << tmp1 << " " << tmp2; for(int i = 1; i <= 2; i++) { @@ -360,12 +360,9 @@ return (force/mass); } -void PhysicsObject::applyForce (Force force, TimeMS dt) { - // XXX: dt is not used? It is here because we might want forces to - // apply longer than one tick in the future. - - // Add applied force to the queue - forceq.push(force); +void PhysicsObject::applyForce (Force force) { + // Add applied force to the queue + forceq.push(force); } void PhysicsObject::changeAim(float da) { diff -r 0d34c0dce83c -r 16a73ebca810 src/proto2/Physics.hh --- a/src/proto2/Physics.hh Fri Nov 28 15:14:39 2008 +0000 +++ b/src/proto2/Physics.hh Fri Nov 28 15:27:51 2008 +0000 @@ -98,7 +98,7 @@ * @param force Force vector. * @param dt The time the force is applied. */ - virtual void applyForce (Force force, TimeMS dt); + virtual void applyForce (Force force); /** * Changes player aim