X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fendsequence.cpp;h=2e4cc6a4133fbde3d7d05d612df746939bf6ae9e;hb=75acd4b141f45e851a492f089aa9ad24a9552409;hp=3a56cac468490b973658ff834f3d6dda4fe243d8;hpb=f2d345c3ccec7743e39df2f59e546ad415257b81;p=supertux.git diff --git a/src/object/endsequence.cpp b/src/object/endsequence.cpp index 3a56cac46..2e4cc6a41 100644 --- a/src/object/endsequence.cpp +++ b/src/object/endsequence.cpp @@ -51,7 +51,7 @@ void EndSequence::update(float elapsed_time) { if (!isrunning) return; - running(elapsed_time); + running(elapsed_time); } void @@ -65,10 +65,11 @@ EndSequence::start() if (isrunning) return; isrunning = true; isdone = false; - + Player& tux = *Sector::current()->player; end_sequence_controller = new CodeController(); tux.set_controller(end_sequence_controller); + tux.set_speedlimit(230); //MAX_WALK_XM starting(); } @@ -99,33 +100,18 @@ EndSequence::is_done() { return isdone; } - + void EndSequence::starting() { - last_x_pos = -1; - endsequence_timer.start(7.3); } void EndSequence::running(float /*elapsed_time*/) { - Player& tux = *Sector::current()->player; - - if (tux_may_walk) { - end_sequence_controller->press(Controller::RIGHT); - 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 EndSequence::stopping() { } -