From: Matthias Braun Date: Sun, 6 Jan 2008 11:11:21 +0000 (+0000) Subject: simplify physic formula a bit X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=24dee16ba721c757b53c3cca08951c867b49c6a7;p=supertux.git simplify physic formula a bit SVN-Revision: 5260 --- diff --git a/src/physic.cpp b/src/physic.cpp index 5da55a34d..cdc37879f 100644 --- a/src/physic.cpp +++ b/src/physic.cpp @@ -158,12 +158,9 @@ Physic::get_movement(float elapsed_time) { float grav = gravity_enabled_flag ? gravity : 0; - Vector result( - vx * elapsed_time + ax * elapsed_time * elapsed_time, - vy * elapsed_time + (ay + grav) * elapsed_time * elapsed_time - ); vx += ax * elapsed_time; vy += (ay + grav) * elapsed_time; + Vector result(vx * elapsed_time, vy * elapsed_time); return result; }