X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftitle.cpp;h=5b31fe3b1aa82e4a7b86cebf836d0bf44ee1125e;hb=f53572ad2b744ddddd7cc4b6479489543d44f98d;hp=fd8856b49154f67b2b9838d1368fac85b7e5da7b;hpb=c62711567861587107d124642db29e2674ee6533;p=supertux.git diff --git a/src/title.cpp b/src/title.cpp index fd8856b49..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