From: LMH Date: Tue, 3 Sep 2013 21:11:28 +0000 (-1000) Subject: Added a secondary coin sound to distinguish between coins collected and coins interac... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f8e7c8b10f9dd1972ad1e905e6b5273f362f78a3;p=supertux.git Added a secondary coin sound to distinguish between coins collected and coins interacting with the environment --- diff --git a/data/sounds/coin2.ogg b/data/sounds/coin2.ogg new file mode 100644 index 000000000..863f92894 Binary files /dev/null and b/data/sounds/coin2.ogg differ diff --git a/src/object/coin.cpp b/src/object/coin.cpp index 3b0efc158..58aca7667 100644 --- a/src/object/coin.cpp +++ b/src/object/coin.cpp @@ -178,7 +178,7 @@ HeavyCoin::HeavyCoin(const Vector& pos, const Vector& init_velocity) physic() { physic.enable_gravity(true); - sound_manager->preload("sounds/coin.wav"); + sound_manager->preload("sounds/coin2.ogg"); set_group(COLGROUP_MOVING); physic.set_velocity(init_velocity); } @@ -188,7 +188,7 @@ HeavyCoin::HeavyCoin(const Reader& reader) physic() { physic.enable_gravity(true); - sound_manager->preload("sounds/coin.wav"); + sound_manager->preload("sounds/coin2.ogg"); set_group(COLGROUP_MOVING); } @@ -207,7 +207,7 @@ HeavyCoin::collision_solid(const CollisionHit& hit) if(hit.bottom) { if(physic.get_velocity_y() > clink_threshold) - sound_manager->play("sounds/coin.wav"); + sound_manager->play("sounds/coin2.ogg"); if(physic.get_velocity_y() > 200) {// lets some coins bounce physic.set_velocity_y(-99); }else{ @@ -217,12 +217,12 @@ HeavyCoin::collision_solid(const CollisionHit& hit) } if(hit.right || hit.left) { if(physic.get_velocity_x() > clink_threshold || physic.get_velocity_x() < clink_threshold) - sound_manager->play("sounds/coin.wav"); + sound_manager->play("sounds/coin2.ogg"); physic.set_velocity_x(-physic.get_velocity_x()); } if(hit.top) { if(physic.get_velocity_y() < clink_threshold) - sound_manager->play("sounds/coin.wav"); + sound_manager->play("sounds/coin2.ogg"); physic.set_velocity_y(-physic.get_velocity_y()); } }