hedgewars/uGears.pas
changeset 4329 5e5fbe5337e1
parent 4327 224efdd648e1
child 4337 85e02b1a8e8f
equal deleted inserted replaced
4327:224efdd648e1 4329:5e5fbe5337e1
  1445     Gear:= t^.ar[i];
  1445     Gear:= t^.ar[i];
  1446     tmpDmg:= ModifyDamage(Damage, Gear);
  1446     tmpDmg:= ModifyDamage(Damage, Gear);
  1447     if (Gear^.State and gstNoDamage) = 0 then
  1447     if (Gear^.State and gstNoDamage) = 0 then
  1448         begin
  1448         begin
  1449         
  1449         
  1450         VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
  1450         if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then 
  1451         if VGear <> nil then
  1451         begin
  1452         begin
  1452             VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
  1453             VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
  1453             if VGear <> nil then
       
  1454             begin
       
  1455                 VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
       
  1456             end;
  1454         end;
  1457         end;
  1455         
  1458         
  1456         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;
  1459         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;
  1457 
  1460 
  1458         case Gear^.Kind of
  1461         case Gear^.Kind of