# HG changeset patch # User nemo # Date 1269666952 0 # Node ID e5a1bc4e56fd50393f3e47fccbbdb4b8bb271287 # Parent 6fa39c1c41b9c5f1c6a5a824fbc0492b98f01540 Specifically check for current hedgehog being on rope, the tricky bastard. diff -r 6fa39c1c41b9 -r e5a1bc4e56fd hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Mar 27 04:02:02 2010 +0000 +++ b/hedgewars/uGears.pas Sat Mar 27 05:15:52 2010 +0000 @@ -1884,6 +1884,14 @@ i, tmpDmg: LongInt; begin t:= CheckGearsCollision(Ammo); +// Just to avoid hogs on rope dodging fire. +if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) 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 + t^.ar[t^.Count]:= CurrentHedgehog^.Gear; + inc(t^.Count) + end; i:= t^.Count; if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;