hedgewars/uGears.pas
changeset 4165 dec8aafc6414
parent 4159 64e677349124
child 4168 49ad7bea4a33
equal deleted inserted replaced
4164:f2c8c70ec4de 4165:dec8aafc6414
  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;
  1418     end else
       
  1419     with CurrentHedgehog^.Gear^ do
       
  1420         State:= State or gstMoving;
       
  1421 
  1419 i:= t^.Count;
  1422 i:= t^.Count;
  1420 
  1423 
  1421 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;
  1424 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;
  1422 while i > 0 do
  1425 while i > 0 do
  1423     begin
  1426     begin