bool Player::is_dead()
{
- if(base.y > World::current()->get_level()->height * /*TILE_HEIGHT*/ 32 || base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // last condition can happen in auto-scrolling
+ if(base.y > screen->h + scroll_y ||
+ base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // can happen in auto-scrolling
return true;
else
return false;
float tux_pos_y = tux.base.y + (tux.base.height/2);
- if(level->height > VISIBLE_TILES_Y-1)
+ if(level->height > VISIBLE_TILES_Y-1 && !tux.dying)
{
if (scroll_y < tux_pos_y - (screen->h - Y_SPACE))
scroll_y = tux_pos_y - (screen->h - Y_SPACE);