X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftitle.cpp;h=5b31fe3b1aa82e4a7b86cebf836d0bf44ee1125e;hb=f53572ad2b744ddddd7cc4b6479489543d44f98d;hp=edb44c6c307e6fc649433866cd61eb7208e10b81;hpb=9b58f72e1c6900540c0ee00a800ed57d2c1f4974;p=supertux.git diff --git a/src/title.cpp b/src/title.cpp index edb44c6c3..5b31fe3b1 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -63,6 +63,7 @@ #include "log.hpp" #include "options_menu.hpp" #include "console.hpp" +#include "random_generator.hpp" enum MainMenuIDs { MNID_STARTGAME, @@ -239,9 +240,9 @@ TitleScreen::make_tux_jump() if(pathBlocked) jumpDuration = 0.5; else - jumpDuration = float(rand() % 500 + 300) / 1000.0; + jumpDuration = systemRandom.randf(0.3, 0.8); jumpPushTimer.start(jumpDuration); - randomWaitTimer.start(float(rand() % 3000 + 3000) / 1000.0); + randomWaitTimer.start(systemRandom.randf(3.0, 6.0)); } // Keep jump button pressed @@ -299,6 +300,7 @@ TitleScreen::leave() { Sector* sector = titlesession->get_current_sector(); sector->deactivate(); + Menu::set_current(NULL); } void