X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgameloop.cpp;h=275c42fa62190be20265986908a69430a560d051;hb=32c639e36abc3b7bd99380c8b5da768a127fafd6;hp=84e4be2764bc5a07a275a97ceb57685964e10454;hpb=ef57479f613b900b73eba8e8f4d026aae0de25cc;p=supertux.git diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 84e4be276..275c42fa6 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -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);