projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Let Tux bounce off badguys when he's invincible. This let's us bounce off guys like...
[supertux.git]
/
src
/
title.cpp
diff --git
a/src/title.cpp
b/src/title.cpp
index
edb44c6
..
5b31fe3
100644
(file)
--- a/
src/title.cpp
+++ b/
src/title.cpp
@@
-63,6
+63,7
@@
#include "log.hpp"
#include "options_menu.hpp"
#include "console.hpp"
#include "log.hpp"
#include "options_menu.hpp"
#include "console.hpp"
+#include "random_generator.hpp"
enum MainMenuIDs {
MNID_STARTGAME,
enum MainMenuIDs {
MNID_STARTGAME,
@@
-239,9
+240,9
@@
TitleScreen::make_tux_jump()
if(pathBlocked)
jumpDuration = 0.5;
else
if(pathBlocked)
jumpDuration = 0.5;
else
- jumpDuration =
float(rand() % 500 + 300) / 1000.0
;
+ jumpDuration =
systemRandom.randf(0.3, 0.8)
;
jumpPushTimer.start(jumpDuration);
jumpPushTimer.start(jumpDuration);
- randomWaitTimer.start(
float(rand() % 3000 + 3000) / 1000.0
);
+ randomWaitTimer.start(
systemRandom.randf(3.0, 6.0)
);
}
// Keep jump button pressed
}
// Keep jump button pressed
@@
-299,6
+300,7
@@
TitleScreen::leave()
{
Sector* sector = titlesession->get_current_sector();
sector->deactivate();
{
Sector* sector = titlesession->get_current_sector();
sector->deactivate();
+ Menu::set_current(NULL);
}
void
}
void