hedgewars/GSHandlers.inc
changeset 3351 3fd3f116f2fc
parent 3350 5cd02aafc612
child 3355 dc9e61e67484
--- a/hedgewars/GSHandlers.inc	Fri Apr 16 16:04:41 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Apr 16 17:17:43 2010 +0000
@@ -3054,7 +3054,26 @@
 begin
 AllInactive:= false;
 doStepFallingGear(Gear);
-if (Gear^.State and gstCollision) <> 0 then
+if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.Message and gm_Slot) <> 0) then
+    begin
+    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);
+        end;
+    CurrentHedgehog^.Gear^.MsgParam:= 0;
+    CurrentHedgehog^.Gear^.Message:= CurrentHedgehog^.Gear^.Message and not gm_Slot;
+    end;
+
+if (Gear^.State and gstDrowning) <> 0 then
+    ResumeMusic
+else if (Gear^.State and gstCollision) <> 0 then
     begin
     r0:= GetRandom(21);
     r1:= GetRandom(21);