X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fcoin.cpp;h=c75312fb9adfb02633fcde87821be07c16202a41;hb=5745d9670262c91e6cd35363fd0d2ec169e7c8a4;hp=e9e0a0d2c3e2617e0a2d952974f52a8d07c08973;hpb=2892ebda09d24c977547159e34abf0244884b89e;p=supertux.git diff --git a/src/object/coin.cpp b/src/object/coin.cpp index e9e0a0d2c..c75312fb9 100644 --- a/src/object/coin.cpp +++ b/src/object/coin.cpp @@ -52,7 +52,7 @@ Coin::collect() { // TODO: commented out musical code. Maybe fork this for a special "MusicalCoin" object? /* - static Timer sound_timer; + static Timer sound_timer; static int pitch_one = 128; static float last_pitch = 1; float pitch = 1; @@ -63,11 +63,11 @@ Coin::collect() pitch_one = tile; pitch = 1; last_pitch = 1; - } + } else if (sound_timer.get_timegone() < 0.02) { pitch = last_pitch; - } - else + } + else { switch ((pitch_one - tile) % 7) { case -6: