diff --git a/source/sections/game.cpp b/source/sections/game.cpp index fcbce97..887a9ad 100644 --- a/source/sections/game.cpp +++ b/source/sections/game.cpp @@ -606,6 +606,7 @@ void Game::handleItemDrop(const std::shared_ptr &balloon, const std::sh if (DROPPED_ITEM != ItemType::COFFEE_MACHINE) { createItem(DROPPED_ITEM, balloon->getPosX(), balloon->getPosY()); + playSound("item_drop.wav"); } else { createItem(DROPPED_ITEM, player->getPosX(), param.game.game_area.rect.y - Item::COFFEE_MACHINE_HEIGHT); coffee_machine_enabled_ = true; @@ -733,7 +734,6 @@ auto Game::dropItem() -> ItemType { // Crea un objeto item void Game::createItem(ItemType type, float x, float y) { items_.emplace_back(std::make_unique(type, x, y, param.game.play_area.rect, item_textures_[static_cast(type) - 1], item_animations_[static_cast(type) - 1])); - playSound("item_drop.wav"); } // Vacia el vector de items