File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2124,12 +2124,15 @@ Player::check_bounds()
2124
2124
if (m_col.m_bbox .get_right () > Sector::get ().get_width ()) {
2125
2125
// Lock Tux to the size of the level, so that he doesn't fall off
2126
2126
// the right side
2127
- set_pos (Vector (Sector::get ().get_width () - m_col.m_bbox .get_width (), m_col.m_bbox .get_top ()));
2127
+ set_pos (Vector (Sector::get ().get_width () - m_col.m_bbox .get_width (),
2128
+ m_col.m_bbox .get_top ()));
2128
2129
}
2129
2130
2130
2131
// If Tux is swimming, don't allow him to go below the sector
2131
- if (m_swimming && !m_ghost_mode && m_col.m_bbox .get_bottom () > Sector::get ().get_height ()) {
2132
- set_pos (Vector (m_col.m_bbox .get_left (), Sector::get ().get_height () - m_col.m_bbox .get_height ()));
2132
+ if (m_swimming && !m_ghost_mode && !is_dying () && !is_dead ()
2133
+ && m_col.m_bbox .get_bottom () > Sector::get ().get_height ()) {
2134
+ set_pos (Vector (m_col.m_bbox .get_left (),
2135
+ Sector::get ().get_height () - m_col.m_bbox .get_height ()));
2133
2136
}
2134
2137
2135
2138
/* fallen out of the level? */
You can’t perform that action at this time.
0 commit comments