TODO update
[supertux.git] / src / gameloop.cpp
index 84e4be2..275c42f 100644 (file)
@@ -765,12 +765,11 @@ GameSession::run()
     //frame_rate.update();
     
     /* Handle time: */
-    if (time_left.check() && currentsector->player->dying == DYING_NOT
-        && !end_sequence)
+    if (time_left.check() && !end_sequence)
       currentsector->player->kill(Player::KILL);
     
     /* Handle music: */
-    if(currentsector->player->invincible_timer.check() && !end_sequence)
+    if (currentsector->player->invincible_timer.started() && !end_sequence)
     {
       currentsector->play_music(HERRING_MUSIC);
     }
@@ -850,7 +849,7 @@ GameSession::drawstatus(DrawingContext& context)
           LEFT_ALLIGN, LAYER_FOREGROUND1);
     }
 
-  if(time_left.check()) {
+  if(time_left.get_timeleft() < 0) {
     context.draw_text(white_text, _("TIME's UP"), Vector(screen->w/2, 0),
         CENTER_ALLIGN, LAYER_FOREGROUND1);
   } else if (time_left.get_timeleft() > TIME_WARNING
@@ -965,12 +964,6 @@ bool process_load_game_menu()
       stream << slot;
       std::string slotfile = st_save_dir + "/slot" + stream.str() + ".stsg";
 
-      if (access(slotfile.c_str(), F_OK) != 0)
-        {
-          shrink_fade(Vector(screen->w/2,screen->h/2), 600);
-          draw_intro();
-        }
-
       fadeout(256);
       DrawingContext context;
       context.draw_text(white_text, "Loading...",
@@ -979,7 +972,7 @@ bool process_load_game_menu()
 
       WorldMapNS::WorldMap worldmap;
 
-      worldmap.set_map_filename("icyisland.stwm");
+      worldmap.set_map_filename("/levels/world1/worldmap.stwm");
       // Load the game or at least set the savegame_file variable
       worldmap.loadgame(slotfile);