hedgewars/uGears.pas
changeset 3094 97c8406acc85
parent 3086 d11dea92fa2c
child 3097 6fa39c1c41b9
--- a/hedgewars/uGears.pas	Sat Mar 27 00:48:59 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 27 02:55:35 2010 +0000
@@ -57,6 +57,7 @@
             IntersectGear: PGear;
             FlightTime: Longword;
             uid: Longword;
+            ImpactSound: TSound;
             SoundChannel: LongInt
         end;
 
@@ -246,6 +247,7 @@
 gear^.FlightTime:= 0;
 gear^.uid:= Counter;
 gear^.SoundChannel:= -1;
+gear^.ImpactSound:= sndNone;
 
 if CurrentTeam <> nil then
     begin
@@ -256,6 +258,7 @@
 case Kind of
    gtAmmo_Bomb,
  gtClusterBomb: begin
+                gear^.ImpactSound:= sndGrenadeImpact;
                 gear^.AdvBounce:= 1;
                 gear^.Radius:= 4;
                 gear^.Elasticity:= _0_6;
@@ -264,6 +267,7 @@
                 if gear^.Timer = 0 then gear^.Timer:= 3000
                 end;
   gtWatermelon: begin
+                gear^.ImpactSound:= sndMelonImpact;
                 gear^.AdvBounce:= 1;
                 gear^.Radius:= 4;
                 gear^.Elasticity:= _0_8;
@@ -287,6 +291,7 @@
                 gear^.Z:= 2002;
                 end;
        gtGrave: begin
+                gear^.ImpactSound:= sndGraveImpact;
                 gear^.Radius:= 10;
                 gear^.Elasticity:= _0_6;
                 end;
@@ -329,10 +334,12 @@
                     gear^.Timer:= cMinesTime*1;
                 end;
         gtCase: begin
+                gear^.ImpactSound:= sndGraveImpact;
                 gear^.Radius:= 16;
                 gear^.Elasticity:= _0_3
                 end;
   gtExplosives: begin
+                gear^.ImpactSound:= sndGrenadeImpact;
                 gear^.Radius:= 16;
                 gear^.Elasticity:= _0_4;
                 gear^.Friction:= _0_995;
@@ -404,6 +411,7 @@
                 if not dX.isNegative then gear^.Angle:= 1 else gear^.Angle:= 3
                 end;
  gtHellishBomb: begin
+                gear^.ImpactSound:= sndHellishImpact;
                 gear^.AdvBounce:= 1;
                 gear^.Radius:= 4;
                 gear^.Elasticity:= _0_5;
@@ -416,6 +424,7 @@
                 gear^.Radius:= 4
                 end;
         gtBall: begin
+                gear^.ImpactSound:= sndGrenadeImpact;
                 gear^.AdvBounce:= 1;
                 gear^.Radius:= 5;
                 gear^.Tag:= random(8);