hedgewars/uGearsUtils.pas
changeset 9557 a5005b7ca305
parent 9522 a386e1cdc468
child 9561 aab34634a17b
--- a/hedgewars/uGearsUtils.pas	Sat Oct 19 00:42:24 2013 +0400
+++ b/hedgewars/uGearsUtils.pas	Sat Oct 19 15:59:47 2013 -0400
@@ -61,7 +61,6 @@
 
 var doStepHandlers: array[TGearType] of TGearStepProcedure;
 
-
 implementation
 uses uSound, uCollisions, uUtils, uConsts, uVisualGears, uAIMisc,
     uVariables, uLandGraphics, uScript, uStats, uCaptions, uTeams, uStore,
@@ -1229,20 +1228,25 @@
         begin
         if (hwRound(Gear^.X)-Gear^.Radius < leftX) then
              Gear^.X:= int2hwfloat(rightX-Gear^.Radius)
-        else Gear^.X:= int2hwfloat(leftX+Gear^.Radius)
+        else Gear^.X:= int2hwfloat(leftX+Gear^.Radius);
+        LeftImpactTimer:= 150;
+        RightImpactTimer:= 150
         end
     else if WorldEdge = weBounce then
         begin
         if (hwRound(Gear^.X)-Gear^.Radius < leftX) then
             begin
+            LeftImpactTimer:= 333;
             Gear^.dX.isNegative:= false;
             Gear^.X:= int2hwfloat(leftX+Gear^.Radius)
             end
         else 
             begin
+            RightImpactTimer:= 333;
             Gear^.dX.isNegative:= true;
             Gear^.X:= int2hwfloat(rightX-Gear^.Radius)
-            end
+            end;
+        PlaySound(sndMelonImpact);
         end
     else if WorldEdge = weSea then
         begin