projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Cleanups
[supertux.git]
/
src
/
worldmap.cpp
diff --git
a/src/worldmap.cpp
b/src/worldmap.cpp
index
f67109d
..
7f87ad4
100644
(file)
--- a/
src/worldmap.cpp
+++ b/
src/worldmap.cpp
@@
-436,6
+436,8
@@
WorldMap::load_map()
reader.read_string("level", level.name, true);
reader.read_int("x", level.x);
reader.read_int("y", level.y);
reader.read_string("level", level.name, true);
reader.read_int("x", level.x);
reader.read_int("y", level.y);
+ level.auto_path = true;
+ reader.read_bool("auto-path", level.auto_path);
level.swap_x = level.swap_y = -1;
reader.read_int("swap-x", level.swap_x);
reader.read_int("swap-y", level.swap_y);
level.swap_x = level.swap_y = -1;
reader.read_int("swap-x", level.swap_x);
reader.read_int("swap-y", level.swap_y);
@@
-695,7
+697,7
@@
WorldMap::update(float delta)
else
player_status.bonus = PlayerStatus::NO_BONUS;
else
player_status.bonus = PlayerStatus::NO_BONUS;
- if (old_level_state != level->solved)
+ if (old_level_state != level->solved
&& level->auto_path
)
{ // Try to detect the next direction to which we should walk
// FIXME: Mostly a hack
Direction dir = D_NONE;
{ // Try to detect the next direction to which we should walk
// FIXME: Mostly a hack
Direction dir = D_NONE;
@@
-960,7
+962,7
@@
WorldMap::display()
unsigned int last_update_time;
unsigned int update_time;
unsigned int last_update_time;
unsigned int update_time;
- last_update_time = update_time =
st_get_ticks
();
+ last_update_time = update_time =
Ticks::get
();
DrawingContext context;
while(!quit)
DrawingContext context;
while(!quit)
@@
-973,7
+975,7
@@
WorldMap::display()
delta = .3f;
last_update_time = update_time;
delta = .3f;
last_update_time = update_time;
- update_time =
st_get_ticks
();
+ update_time =
Ticks::get
();
Vector tux_pos = tux->get_pos();
if (1)
Vector tux_pos = tux->get_pos();
if (1)