hedgewars/GSHandlers.inc
changeset 652 4cca0c7de609
parent 602 f7628ebfccde
child 690 e9d35e319328
--- a/hedgewars/GSHandlers.inc	Thu Dec 13 15:45:31 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Dec 13 16:10:58 2007 +0000
@@ -591,9 +591,9 @@
          begin
          tx:= cc*len;
          ty:= cs*len;
-         lx:= hwRound(Gear^.X + tx) + hwSign(HHGear^.dX);
-         ly:= hwRound(Gear^.Y + ty) + hwSign(HHGear^.dY);
-         if ((ly and $FFFFFC00) = 0) and ((lx and $FFFFF800) = 0)and (Land[ly, lx] <> 0) then
+         lx:= hwRound(Gear^.X + tx) + hwSign(HHGear^.dX)*2;
+         ly:= hwRound(Gear^.Y + ty) + hwSign(HHGear^.dY)*2;
+         if ((ly and $FFFFFC00) = 0) and ((lx and $FFFFF800) = 0) and (Land[ly, lx] <> 0) then
            begin
            with RopePoints.ar[RopePoints.Count] do
                 begin
@@ -1223,7 +1223,9 @@
 
    repeat
      CurrentTeam^.CurrHedgehog:= Succ(CurrentTeam^.CurrHedgehog) mod (CurrentTeam^.HedgehogsNumber);
-   until (CurrentHedgehog^.Gear <> nil);
+   until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil);
+
+   CurrentHedgehog:= @CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog];
 
    HHGear:= CurrentHedgehog^.Gear;
    HHGear^.State:= State;