hedgewars/GSHandlers.inc
changeset 346 fc1e0a4f152c
parent 345 fa39c61be4de
child 351 29bc9c36ad5f
equal deleted inserted replaced
345:fa39c61be4de 346:fc1e0a4f152c
   567    end else
   567    end else
   568    if RopePoints.Count > 0 then // check whether the last dividing point could be removed
   568    if RopePoints.Count > 0 then // check whether the last dividing point could be removed
   569       begin
   569       begin
   570       tx:= RopePoints.ar[Pred(RopePoints.Count)].X;
   570       tx:= RopePoints.ar[Pred(RopePoints.Count)].X;
   571       ty:= RopePoints.ar[Pred(RopePoints.Count)].Y;
   571       ty:= RopePoints.ar[Pred(RopePoints.Count)].Y;
       
   572       if GameTicks = 189245 then
       
   573          begin
       
   574          AddFileLog('tx = ' + floattostr(tx) + ' ty = ' + floattostr(ty));
       
   575          AddFileLog('Gear.X = ' + floattostr(Gear.X) + ' Gear.Y = ' + floattostr(Gear.Y));
       
   576          AddFileLog('HHGear.X = ' + floattostr(HHGear.X) + ' HHGear.Y = ' + floattostr(HHGear.Y));
       
   577          end;
   572       if RopePoints.ar[Pred(RopePoints.Count)].b xor ((tx - Gear.X) * (ty - HHGear.Y) > (tx - HHGear.X) * (ty - Gear.Y)) then
   578       if RopePoints.ar[Pred(RopePoints.Count)].b xor ((tx - Gear.X) * (ty - HHGear.Y) > (tx - HHGear.X) * (ty - Gear.Y)) then
   573          begin
   579          begin
   574          dec(RopePoints.Count);
   580          dec(RopePoints.Count);
   575          Gear.X:=RopePoints.ar[RopePoints.Count].X;
   581          Gear.X:=RopePoints.ar[RopePoints.Count].X;
   576          Gear.Y:=RopePoints.ar[RopePoints.Count].Y;
   582          Gear.Y:=RopePoints.ar[RopePoints.Count].Y;