From: Tobias Markus Date: Sun, 8 Mar 2015 15:26:58 +0000 (+0100) Subject: Make tux and yeti dying state not reveal secret tilemaps X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2e163cb10e0a6af504275585e7c31091931dd7b2;p=supertux.git Make tux and yeti dying state not reveal secret tilemaps --- diff --git a/src/badguy/yeti.cpp b/src/badguy/yeti.cpp index 26c47d6f7..8d1b49b58 100644 --- a/src/badguy/yeti.cpp +++ b/src/badguy/yeti.cpp @@ -212,6 +212,9 @@ void Yeti::take_hit(Player& ) physic.set_velocity_x(0); physic.set_velocity_y(0); + // Set the badguy layer to be above the foremost, so that + // this does not reveal secret tilemaps: + layer = Sector::current()->get_foremost_layer() + 1; state = SQUISHED; state_timer.start(YETI_SQUISH_TIME); set_colgroup_active(COLGROUP_MOVING_ONLY_STATIC); diff --git a/src/object/player.cpp b/src/object/player.cpp index 7aa2004d0..7fa598388 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -1312,7 +1312,11 @@ Player::draw(DrawingContext& context) } } else { - sprite->draw(context, get_pos(), LAYER_OBJECTS + 1); + if(dying) + sprite->draw(context, get_pos(), Sector::current()->get_foremost_layer() + 1); + else + sprite->draw(context, get_pos(), LAYER_OBJECTS + 1); + if (player_status->bonus == AIR_BONUS) powersprite->draw(context, get_pos(), LAYER_OBJECTS + 1); }