hedgewars/GSHandlers.inc
changeset 7098 f8c453ade379
parent 7093 2d7f1fb73335
child 7101 d8fb38141950
equal deleted inserted replaced
7097:ed417e912267 7098:f8c453ade379
  5488             Y:= Y + dY;
  5488             Y:= Y + dY;
  5489             gX:= hwRound(X);
  5489             gX:= hwRound(X);
  5490             gY:= hwRound(Y);
  5490             gY:= hwRound(Y);
  5491             if Target.X = NoPointX then t:= hwRound(hwSqr(X-HHGear^.X)+hwSqr(Y-HHGear^.Y));
  5491             if Target.X = NoPointX then t:= hwRound(hwSqr(X-HHGear^.X)+hwSqr(Y-HHGear^.Y));
  5492             if Target.X <> NoPointX then
  5492             if Target.X <> NoPointX then
       
  5493                 begin
       
  5494                 if (abs(gX-Target.X) < 2) and (abs(gY-Target.Y) < 2) then
       
  5495                     begin
       
  5496                     X:= HHGear^.X;
       
  5497                     Y:= HHGear^.Y
       
  5498                     end;
  5493                 inc(Pos)
  5499                 inc(Pos)
       
  5500                 end
  5494             else if (gY > cWaterLine) or
  5501             else if (gY > cWaterLine) or
  5495                     (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0))
  5502                     (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0))
  5496                         and ((Land[gY, gX] and $FF00 and not lfIce <> 0) or
  5503                         and ((Land[gY, gX] and $FF00 and not lfIce <> 0) or
  5497                              ((Land[gY, gX] and $00FF <> 0) and (t > 400)))) then
  5504                              ((Land[gY, gX] and $00FF <> 0) and (t > 400)))) then
  5498                 begin
  5505                 begin