add check for other forms of flight too
authornemo
Sun, 21 Aug 2011 11:24:20 -0400
changeset 5622 93e97d3a2c10
parent 5620 05445149f2d5
child 5624 b6f70f6335ee
add check for other forms of flight too
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sun Aug 21 09:26:33 2011 -0400
+++ b/hedgewars/uGears.pas	Sun Aug 21 11:24:20 2011 -0400
@@ -1409,7 +1409,7 @@
 begin
 t:= CheckGearsCollision(Ammo);
 // Just to avoid hogs on rope dodging fire.
-if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) and
+if (CurAmmoGear <> nil) and ((CurAmmoGear^.Kind = gtRope) or (CurAmmoGear^.Kind = gtJetpack) or (CurAmmoGear^.Kind = gtBirdy)) and
    (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and
    (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then
     begin