equal
deleted
inserted
replaced
1882 var t: PGearArray; |
1882 var t: PGearArray; |
1883 Gear: PGear; |
1883 Gear: PGear; |
1884 i, tmpDmg: LongInt; |
1884 i, tmpDmg: LongInt; |
1885 begin |
1885 begin |
1886 t:= CheckGearsCollision(Ammo); |
1886 t:= CheckGearsCollision(Ammo); |
|
1887 // Just to avoid hogs on rope dodging fire. |
|
1888 if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) and |
|
1889 (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and |
|
1890 (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then |
|
1891 begin |
|
1892 t^.ar[t^.Count]:= CurrentHedgehog^.Gear; |
|
1893 inc(t^.Count) |
|
1894 end; |
1887 i:= t^.Count; |
1895 i:= t^.Count; |
1888 |
1896 |
1889 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0; |
1897 if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0; |
1890 while i > 0 do |
1898 while i > 0 do |
1891 begin |
1899 begin |