# HG changeset patch # User Wuzzy # Date 1540522469 -7200 # Node ID 3ae88a9f9dcab74100063c2c32213d2bcdf3d633 # Parent e340ce5500d7bc4ef644d545dd8c80d8904cdfb6 If u play Piano, you can now hear the notes if sound effects OR music is enabled Previously, they always required sound effects to be on diff -r e340ce5500d7 -r 3ae88a9f9dca ChangeLog.txt --- a/ChangeLog.txt Fri Oct 26 04:30:47 2018 +0200 +++ b/ChangeLog.txt Fri Oct 26 04:54:29 2018 +0200 @@ -58,7 +58,7 @@ * Prevent voices from being spoken directly before a victory voice * Fix damage not being displayed if hog drowns in water with 100% opacity (like in Compost theme) * Fix retreat timer appearing after using baseball bat or whip and immediately taking damage - * Fix Ride of the Valkyries not playing if music is enabled and sounds are disabled + * Fix musical effects of RC plane and piano not playing if music is enabled but sounds effects are disabled Frontend: + Add help button in main menu (link to Hedgewars Wiki) diff -r e340ce5500d7 -r 3ae88a9f9dca hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Fri Oct 26 04:30:47 2018 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Fri Oct 26 04:54:29 2018 +0200 @@ -5188,19 +5188,21 @@ odY: hwFloat; begin AllInactive := false; + // Play piano notes with slot keys if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.Message and gmSlot) <> 0) then begin + // Piano notes are played if sound OR music (or both) is enabled case CurrentHedgehog^.Gear^.MsgParam of - 0: PlaySound(sndPiano0); - 1: PlaySound(sndPiano1); - 2: PlaySound(sndPiano2); - 3: PlaySound(sndPiano3); - 4: PlaySound(sndPiano4); - 5: PlaySound(sndPiano5); - 6: PlaySound(sndPiano6); - 7: PlaySound(sndPiano7); - else PlaySound(sndPiano8); + 0: PlaySound(sndPiano0, false, false, true); + 1: PlaySound(sndPiano1, false, false, true); + 2: PlaySound(sndPiano2, false, false, true); + 3: PlaySound(sndPiano3, false, false, true); + 4: PlaySound(sndPiano4, false, false, true); + 5: PlaySound(sndPiano5, false, false, true); + 6: PlaySound(sndPiano6, false, false, true); + 7: PlaySound(sndPiano7, false, false, true); + 8: PlaySound(sndPiano8, false, false, true); end; AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); CurrentHedgehog^.Gear^.MsgParam := 0;