Fixed aborting behavior.
authorRicardo Cruz <rick2@aeiou.pt>
Fri, 9 Jul 2004 10:38:58 +0000 (10:38 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Fri, 9 Jul 2004 10:38:58 +0000 (10:38 +0000)
SVN-Revision: 1550

src/title.cpp
src/worldmap.cpp

index 0f60981..b348a46 100644 (file)
@@ -305,6 +305,7 @@ void title(void)
                   leveleditor->run();
                   delete leveleditor;
                   Menu::set_current(main_menu);
+                  update_time = st_get_ticks();
                   break;
                 case MNID_CREDITS:
                   display_text_file("CREDITS", bkg_title, SCROLL_SPEED_CREDITS);
@@ -336,7 +337,6 @@ void title(void)
 
                 update_load_save_game_menu(load_game_menu);
                 Menu::set_current(main_menu);
-                update_time = st_get_ticks();
                 }
               else if (process_load_game_menu())
                 {
index a9e49ae..c122184 100644 (file)
@@ -707,8 +707,11 @@ WorldMap::update(float delta)
                   break;
                 case GameSession::ES_LEVEL_ABORT:
                   /* In case the player's abort the level, keep it using the old
-                      status */
-                  player_status = old_player_status;
+                      status. But the minimum lives and no bonus. */
+                  player_status.score = old_player_status.score;
+                  player_status.distros = old_player_status.distros;
+                  player_status.lives = std::min(old_player_status.lives, player_status.lives);
+                  player_status.bonus = player_status.NO_BONUS;
                   break;
                 case GameSession::ES_GAME_OVER:
                 {