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);
}
}
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);
}