author | nireco |
Thu, 04 Dec 2008 16:46:58 +0000 | |
changeset 192 | f9b5a75cd8cb |
parent 191 | 98fcc0843335 |
child 193 | 0c8f0547a423 |
src/Physics.cc | file | annotate | diff | comparison | revisions |
--- a/src/Physics.cc Thu Dec 04 16:44:55 2008 +0000 +++ b/src/Physics.cc Thu Dec 04 16:46:58 2008 +0000 @@ -114,10 +114,11 @@ float velocity = PLAYER_WALK_SPEED; float walkAmount = (velocity*dt)/1000; Vector reached = this->position; - while(walkAmount > 0) { + while(walkAmount > 0 && !this->inAir) { reached = walk_one_step((1 < walkAmount ? 1 : walkAmount), right); walkAmount--; } + // TODO: Should the remaining walkAmount be handled somehow? return reached; }