Added a secondary coin sound to distinguish between coins collected and coins interac...
authorLMH <lmh.0013@gmail.com>
Tue, 3 Sep 2013 21:11:28 +0000 (11:11 -1000)
committerLMH <lmh.0013@gmail.com>
Tue, 3 Sep 2013 21:11:28 +0000 (11:11 -1000)
data/sounds/coin2.ogg [new file with mode: 0644]
src/object/coin.cpp

diff --git a/data/sounds/coin2.ogg b/data/sounds/coin2.ogg
new file mode 100644 (file)
index 0000000..863f928
Binary files /dev/null and b/data/sounds/coin2.ogg differ
index 3b0efc1..58aca76 100644 (file)
@@ -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());
   }
 }