hedgewars/uGearsUtils.pas
changeset 13780 8a7699ccb608
parent 13778 effef930bd57
child 13856 f01798038c2e
equal deleted inserted replaced
13779:506cca5a48cb 13780:8a7699ccb608
  1330         Gear^.Hedgehog^.Effects[heFrozen]:= max(255,Gear^.Hedgehog^.Effects[heFrozen]-10000);
  1330         Gear^.Hedgehog^.Effects[heFrozen]:= max(255,Gear^.Hedgehog^.Effects[heFrozen]-10000);
  1331     tmpDmg:= ModifyDamage(Damage, Gear);
  1331     tmpDmg:= ModifyDamage(Damage, Gear);
  1332     if (Gear^.State and gstNoDamage) = 0 then
  1332     if (Gear^.State and gstNoDamage) = 0 then
  1333         begin
  1333         begin
  1334 
  1334 
  1335         if (not (Gear^.Kind in [gtMinigun, gtPortal])) and
       
  1336             (Ammo^.Kind in [gtDEagleShot, gtSniperRifleShot, gtMinigunBullet]) then
       
  1337             begin
       
  1338             VGear := AddVisualGear(t^.cX[i], t^.cY[i], vgtBulletHit);
       
  1339             if VGear <> nil then
       
  1340                 VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
       
  1341             end;
       
  1342 
       
  1343         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then
  1335         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then
  1344             Gear^.FlightTime:= 1;
  1336             Gear^.FlightTime:= 1;
  1345 
       
  1346 
  1337 
  1347         case Gear^.Kind of
  1338         case Gear^.Kind of
  1348             gtHedgehog,
  1339             gtHedgehog,
  1349             gtMine,
  1340             gtMine,
  1350             gtAirMine,
  1341             gtAirMine,
  1353             gtTarget,
  1344             gtTarget,
  1354             gtCase,
  1345             gtCase,
  1355             gtExplosives: //,
  1346             gtExplosives: //,
  1356             //gtStructure:
  1347             //gtStructure:
  1357             begin
  1348             begin
       
  1349             if Ammo^.Kind in [gtDEagleShot, gtSniperRifleShot, gtMinigunBullet] then
       
  1350                 begin
       
  1351                 VGear := AddVisualGear(t^.cX[i], t^.cY[i], vgtBulletHit);
       
  1352                 if VGear <> nil then
       
  1353                     VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
       
  1354                 end;
  1358             if (Ammo^.Kind = gtDrill) then
  1355             if (Ammo^.Kind = gtDrill) then
  1359                 begin
  1356                 begin
  1360                 Ammo^.Timer:= 0;
  1357                 Ammo^.Timer:= 0;
  1361                 exit;
  1358                 exit;
  1362                 end;
  1359                 end;