hedgewars/uGears.pas
changeset 5622 93e97d3a2c10
parent 5612 2638dec1b323
child 5638 e35ba2a400d8
equal deleted inserted replaced
5620:05445149f2d5 5622:93e97d3a2c10
  1407     i, tmpDmg: LongInt;
  1407     i, tmpDmg: LongInt;
  1408     VGear: PVisualGear;
  1408     VGear: PVisualGear;
  1409 begin
  1409 begin
  1410 t:= CheckGearsCollision(Ammo);
  1410 t:= CheckGearsCollision(Ammo);
  1411 // Just to avoid hogs on rope dodging fire.
  1411 // Just to avoid hogs on rope dodging fire.
  1412 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) and
  1412 if (CurAmmoGear <> nil) and ((CurAmmoGear^.Kind = gtRope) or (CurAmmoGear^.Kind = gtJetpack) or (CurAmmoGear^.Kind = gtBirdy)) and
  1413    (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and
  1413    (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and
  1414    (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then
  1414    (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then
  1415     begin
  1415     begin
  1416     t^.ar[t^.Count]:= CurrentHedgehog^.Gear;
  1416     t^.ar[t^.Count]:= CurrentHedgehog^.Gear;
  1417     inc(t^.Count)
  1417     inc(t^.Count)