Fix Tux walking backwards after automatic backflipping, fixes #1063
authorTobias Markus <tobbi@mozilla-uk.org>
Mon, 9 Mar 2015 14:45:43 +0000 (15:45 +0100)
committerTobias Markus <tobbi@mozilla-uk.org>
Mon, 9 Mar 2015 14:45:43 +0000 (15:45 +0100)
src/object/player.cpp

index 7fa5983..ce1c8ce 100644 (file)
@@ -416,6 +416,7 @@ Player::update(float elapsed_time)
     if (backflipping && (backflip_timer.get_timegone() > 0.15f)) {
       backflipping = false;
       backflip_direction = 0;
+      physic.set_velocity_x(0);
       if (!stone) {
         sprite->set_angle(0.0f);
         powersprite->set_angle(0.0f);