hedgewars/uGears.pas
branchhedgeroid
changeset 5644 4ad07103cfae
parent 5622 93e97d3a2c10
child 5638 e35ba2a400d8
--- a/hedgewars/uGears.pas	Sun Aug 21 22:18:54 2011 +0200
+++ b/hedgewars/uGears.pas	Sun Aug 21 22:20:20 2011 +0200
@@ -209,7 +209,7 @@
 FillChar(gear^, sizeof(TGear), 0);
 gear^.X:= int2hwFloat(X);
 gear^.Y:= int2hwFloat(Y);
-gear^.TargetX:= NoPointX;
+gear^.Target.X:= NoPointX;
 gear^.Kind := Kind;
 gear^.State:= State;
 gear^.Active:= true;
@@ -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