projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
365706b
)
Restore coins when not using reset point, really
author
Tim Goya
<tuxdev103@gmail.com>
Mon, 29 Jan 2007 16:02:51 +0000
(16:02 +0000)
committer
Tim Goya
<tuxdev103@gmail.com>
Mon, 29 Jan 2007 16:02:51 +0000
(16:02 +0000)
SVN-Revision: 4735
src/game_session.cpp
patch
|
blob
|
history
diff --git
a/src/game_session.cpp
b/src/game_session.cpp
index
ab1697f
..
84c1793
100644
(file)
--- a/
src/game_session.cpp
+++ b/
src/game_session.cpp
@@
-138,6
+138,7
@@
GameSession::restart_level(bool fromBeginning)
}
currentsector->activate(reset_pos);
} else {
}
currentsector->activate(reset_pos);
} else {
+ player_status->coins += 25;
currentsector = level->get_sector("main");
if(!currentsector)
throw std::runtime_error("Couldn't find main sector");
currentsector = level->get_sector("main");
if(!currentsector)
throw std::runtime_error("Couldn't find main sector");
@@
-386,7
+387,6
@@
GameSession::check_end_conditions()
} else if (!end_sequence && tux->is_dead()) {
if (player_status->coins < 0) {
// No more coins: restart level from beginning
} else if (!end_sequence && tux->is_dead()) {
if (player_status->coins < 0) {
// No more coins: restart level from beginning
- player_status->coins += 25;
restart_level(true);
} else {
// Still has coins: restart level from last reset point
restart_level(true);
} else {
// Still has coins: restart level from last reset point