X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fendsequence.cpp;h=2e4cc6a4133fbde3d7d05d612df746939bf6ae9e;hb=1dfbd27a41341f26775ca4e2b9ca4864f5744a6f;hp=23c530fbecf8d33c5bdb41c81bdc09542ce3e46d;hpb=9bf5386f1d1b84b5290bb015e1ede6d1745d5e61;p=supertux.git diff --git a/src/object/endsequence.cpp b/src/object/endsequence.cpp index 23c530fbe..2e4cc6a41 100644 --- a/src/object/endsequence.cpp +++ b/src/object/endsequence.cpp @@ -60,7 +60,7 @@ EndSequence::draw(DrawingContext& /*context*/) } void -EndSequence::start(Direction dir) +EndSequence::start() { if (isrunning) return; isrunning = true; @@ -71,8 +71,6 @@ EndSequence::start(Direction dir) tux.set_controller(end_sequence_controller); tux.set_speedlimit(230); //MAX_WALK_XM - walk_dir = dir; - starting(); } @@ -106,25 +104,11 @@ EndSequence::is_done() void EndSequence::starting() { - last_x_pos = -1; - endsequence_timer.start(7.3f); } void EndSequence::running(float /*elapsed_time*/) { - Player& tux = *Sector::current()->player; - - if (tux_may_walk) { - end_sequence_controller->press((walk_dir == RIGHT) ? Controller::RIGHT : Controller::LEFT); - if (int(last_x_pos) == int(tux.get_pos().x)) { - end_sequence_controller->press(Controller::JUMP); - } - } - - last_x_pos = tux.get_pos().x; - - if (endsequence_timer.check()) isdone = true; } void