projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53d4f6c
)
simplify physic formula a bit
author
Matthias Braun
<matze@braunis.de>
Sun, 6 Jan 2008 11:11:21 +0000
(11:11 +0000)
committer
Matthias Braun
<matze@braunis.de>
Sun, 6 Jan 2008 11:11:21 +0000
(11:11 +0000)
SVN-Revision: 5260
src/physic.cpp
patch
|
blob
|
history
diff --git
a/src/physic.cpp
b/src/physic.cpp
index
5da55a3
..
cdc3787
100644
(file)
--- 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;
}