diff --git a/src/object/player.cpp b/src/object/player.cpp index 9554a6b2898..55e82530ed0 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -254,12 +254,6 @@ Player::Player(PlayerStatus& player_status, const std::string& name_, int player SoundManager::current()->preload("sounds/invincible_start.ogg"); SoundManager::current()->preload("sounds/splash.wav"); SoundManager::current()->preload("sounds/grow.wav"); - m_bubble_particles[0] = Surface::from_file("images/particles/air_bubble-1.png"); - m_bubble_particles[1] = Surface::from_file("images/particles/air_bubble-2.png"); - m_bubble_particles[2] = Surface::from_file("images/particles/air_bubble-3.png"); - m_bubble_particles[3] = Surface::from_file("images/particles/air_bubble-4.png"); - m_bubble_timer.start(3.0f + (rand() % 2)); - m_col.set_size(TUX_WIDTH, is_big() ? BIG_TUX_HEIGHT : SMALL_TUX_HEIGHT); m_sprite->set_angle(0.0f); @@ -521,6 +515,7 @@ Player::update(float dt_sec) if (m_physic.get_velocity_y() > -350.f && m_controller->hold(Control::UP)) m_physic.set_velocity_y(-350.f); } +<<<<<<< HEAD if (m_bubble_timer.check()) { @@ -583,6 +578,8 @@ Player::update(float dt_sec) bool is_out_of_water = Sector::get().is_free_of_tiles(bubble_box, true, Tile::WATER); return is_out_of_water; }), m_active_bubbles.end()); +======= +>>>>>>> parent of f5eea9bed (Add bubbles while being underwater) } else { @@ -2314,13 +2311,10 @@ Player::draw(DrawingContext& context) get_bonus() == EARTH_BONUS ? Color(1.f, 0.9f, 0.6f) : Color(1.f, 1.f, 1.f)); - for (auto bubble_sprite : m_active_bubbles) - { - context.color().draw_surface(bubble_sprite.first, bubble_sprite.second, LAYER_OBJECTS); - } m_sprite->set_color(m_stone ? Color(1.f, 1.f, 1.f) : power_color); } + void Player::collision_tile(uint32_t tile_attributes) { diff --git a/src/object/player.hpp b/src/object/player.hpp index 356b6edc5e4..984dbaa5c4d 100644 --- a/src/object/player.hpp +++ b/src/object/player.hpp @@ -552,10 +552,6 @@ class Player final : public MovingObject SurfacePtr m_airarrow; /**< arrow indicating Tux' position when he's above the camera */ - SurfacePtr m_bubble_particles[4]; /**< bubble particles for swimming */ - Timer m_bubble_timer; /**< timer for spawning bubble particles */ - std::vector> m_active_bubbles; /**< active bubble particles */ - Vector m_floor_normal; bool m_ghost_mode; /**< indicates if Tux should float around and through solid objects */