hedgewars/uGearsHandlersMess.pas
changeset 10799 658794118fd8
parent 10798 777084958f16
child 10800 3c71e5158519
equal deleted inserted replaced
10798:777084958f16 10799:658794118fd8
  1805                                 Gear^.Hedgehog:= @Hedgehogs[i];
  1805                                 Gear^.Hedgehog:= @Hedgehogs[i];
  1806                                 targ:= tmpG;
  1806                                 targ:= tmpG;
  1807                                 end
  1807                                 end
  1808                             end
  1808                             end
  1809                         end;
  1809                         end;
  1810         Gear^.FlightTime:= GameTicks + 10000
  1810         if targ <> nil then Gear^.FlightTime:= GameTicks + 10000
  1811         end;
  1811         end;
  1812     if targ <> nil then
  1812     if targ <> nil then
  1813         begin
  1813         begin
       
  1814         trackSpeed:= _0;
  1814         trackSpeed.QWordValue:= Gear^.Power;
  1815         trackSpeed.QWordValue:= Gear^.Power;
  1815         if (Gear^.X < targ^.X) and (Gear^.dX < _0_1)  then
  1816         if (Gear^.X < targ^.X) and (Gear^.dX < _0_1)  then
  1816              Gear^.dX:= Gear^.dX+trackSpeed
  1817              Gear^.dX:= Gear^.dX+trackSpeed
  1817         else if (Gear^.X > targ^.X) and (Gear^.dX > -_0_1) then
  1818         else if (Gear^.X > targ^.X) and (Gear^.dX > -_0_1) then
  1818             Gear^.dX:= Gear^.dX-trackSpeed;
  1819             Gear^.dX:= Gear^.dX-trackSpeed;