projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Made miniswig support HSQUIRRELVM arguments (and realized it was not needed
[supertux.git]
/
src
/
title.cpp
diff --git
a/src/title.cpp
b/src/title.cpp
index
3ae54f6
..
ae2eaaf
100644
(file)
--- a/
src/title.cpp
+++ b/
src/title.cpp
@@
-69,7
+69,7
@@
static Surface* logo;
static Surface* img_choose_subset;
static bool walking;
static Surface* img_choose_subset;
static bool walking;
-static Timer
2
random_timer;
+static Timer random_timer;
static int frame;
static int frame;
@@
-246,10
+246,10
@@
void draw_demo(float elapsed_time)
controller->press(Controller::RIGHT);
if(random_timer.check() ||
controller->press(Controller::RIGHT);
if(random_timer.check() ||
- (walking &&
(int) last_tux_x_pos == (int) tux->get_pos().x)
) {
+ (walking &&
fabsf(last_tux_x_pos - tux->get_pos().x)) < .1
) {
walking = false;
} else {
walking = false;
} else {
- if(!walking &&
(int) tux->get_pos().y == (int) last_tux_y_pos
) {
+ if(!walking &&
fabsf(tux->get_pos().y - last_tux_y_pos) < .1
) {
random_timer.start(float(rand() % 3000 + 3000) / 1000.);
walking = true;
}
random_timer.start(float(rand() % 3000 + 3000) / 1000.);
walking = true;
}