hedgewars/uGears.pas
changeset 4578 f3cf226fad16
parent 4492 e5554b06b68f
child 4602 ec84fb564bab
--- a/hedgewars/uGears.pas	Mon Dec 20 02:00:22 2010 +0100
+++ b/hedgewars/uGears.pas	Sun Dec 19 21:06:34 2010 -0500
@@ -127,7 +127,8 @@
             @doStepHammer,
             @doStepHammerHit,
             @doStepResurrector,
-            @doStepNapalmBomb
+            @doStepNapalmBomb,
+            @doStepSnowball
             );
 
 procedure InsertGearToList(Gear: PGear);
@@ -246,6 +247,11 @@
        gtShell: begin
                 gear^.Radius:= 4;
                 end;
+       gtSnowball: begin
+                gear^.Radius:= 4;
+                gear^.Elasticity:= _1;
+                gear^.Friction:= _1;
+                end;
        gtGrave: begin
                 gear^.ImpactSound:= sndGraveImpact;
                 gear^.nImpactSounds:= 1;
@@ -1245,13 +1251,10 @@
         begin
         
         if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then 
-        begin
+            begin
             VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
-            if VGear <> nil then
-            begin
-                VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
+            if VGear <> nil then VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
             end;
-        end;
         
         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;