Engine:
authorsmxx
Wed, 07 Apr 2010 12:15:49 +0000
changeset 3320 506f7d6a82b3
parent 3319 af0d256205c1
child 3321 988e39ef3c20
Engine: * readded rope sounds (feedback!)
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
share/hedgewars/Data/Sounds/ropeattach.ogg
share/hedgewars/Data/Sounds/roperelease.ogg
share/hedgewars/Data/Sounds/ropeshot.ogg
--- a/hedgewars/GSHandlers.inc	Wed Apr 07 03:29:38 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Wed Apr 07 12:15:49 2010 +0000
@@ -982,7 +982,7 @@
     Gear^.Friction:= _450;
     Gear^.Elasticity:= _0;
     Gear^.State:= Gear^.State and not gsttmpflag;
-    Gear^.doStep:= @doStepRope
+    Gear^.doStep:= @doStepRope;
     end
 end;
 
@@ -1021,6 +1021,7 @@
 if ((HHGear^.State and gstHHDriven) = 0)
     or (CheckGearDrowning(HHGear)) then
     begin
+    PlaySound(sndRopeRelease);
     DeleteMe;
     exit
     end;
@@ -1159,10 +1160,13 @@
 if (Gear^.Message and gm_Attack) <> 0 then
     if (Gear^.State and gsttmpFlag) <> 0 then
         with PHedgehog(Gear^.Hedgehog)^ do
+            begin
+            PlaySound(sndRopeRelease);
             if Ammo^[CurSlot, CurAmmo].AmmoType <> amParachute then
                 WaitCollision
             else
                 DeleteMe
+            end
     else
 else
     if (Gear^.State and gsttmpFlag) = 0 then
@@ -1223,6 +1227,7 @@
             Gear^.Y:= Gear^.Y + ty;
             Gear^.Elasticity:= tt;
             Gear^.doStep:= @doStepRopeWork;
+            PlaySound(sndRopeAttach);
             with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump);
 
             RemoveFromAmmo;
@@ -1244,6 +1249,7 @@
     else
         begin
         Gear^.doStep:= @doStepRopeWork;
+        PlaySound(sndRopeAttach);
         with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump);
 
         RemoveFromAmmo;
@@ -1269,7 +1275,8 @@
 begin
 Gear^.dX:= - Gear^.dX;
 Gear^.dY:= - Gear^.dY;
-Gear^.doStep:= @doStepRopeAttach
+Gear^.doStep:= @doStepRopeAttach;
+PlaySound(sndRopeShot)
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/uConsts.pas	Wed Apr 07 03:29:38 2010 +0000
+++ b/hedgewars/uConsts.pas	Wed Apr 07 12:15:49 2010 +0000
@@ -823,9 +823,9 @@
             (FileName:                 'Oops.ogg'; Path: ptVoices),// sndOops
             (FileName:                 'Nooo.ogg'; Path: ptVoices),// sndNooo
             (FileName:                'Hello.ogg'; Path: ptVoices),// sndHello
-            (FileName:                         ''; Path: ptSounds),// sndRopeShot
-            (FileName:                         ''; Path: ptSounds),// sndRopeAttach
-            (FileName:                         ''; Path: ptSounds),// sndRopeRelease
+            (FileName:             'ropeshot.ogg'; Path: ptSounds),// sndRopeShot
+            (FileName:           'ropeattach.ogg'; Path: ptSounds),// sndRopeAttach
+            (FileName:          'roperelease.ogg'; Path: ptSounds),// sndRopeRelease
             (FileName:            'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
             (FileName:              'victory.ogg'; Path: ptVoices),// sndVictory
             (FileName:         'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
Binary file share/hedgewars/Data/Sounds/ropeattach.ogg has changed
Binary file share/hedgewars/Data/Sounds/roperelease.ogg has changed
Binary file share/hedgewars/Data/Sounds/ropeshot.ogg has changed