hedgewars/uGears.pas
changeset 4329 5e5fbe5337e1
parent 4327 224efdd648e1
child 4337 85e02b1a8e8f
--- a/hedgewars/uGears.pas	Sun Nov 14 12:57:01 2010 +0100
+++ b/hedgewars/uGears.pas	Sun Nov 14 13:14:05 2010 +0100
@@ -1447,10 +1447,13 @@
     if (Gear^.State and gstNoDamage) = 0 then
         begin
         
-        VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
-        if VGear <> nil then
+        if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then 
         begin
-            VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
+            VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
+            if VGear <> nil then
+            begin
+                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;