hedgewars/uGears.pas
changeset 4182 5240a84df702
parent 4168 49ad7bea4a33
child 4197 dad127904958
equal deleted inserted replaced
4181:1f37ff58062f 4182:5240a84df702
  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)
  1418     end else
  1418     end;
  1419     with CurrentHedgehog^.Gear^ do
       
  1420         State:= State or gstMoving;
       
  1421 
  1419 
  1422 i:= t^.Count;
  1420 i:= t^.Count;
  1423 
  1421 
  1424 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;
  1422 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;
  1425 while i > 0 do
  1423 while i > 0 do