hedgewars/uGearsUtils.pas
changeset 10512 25021aac078e
parent 10508 1a91c1fcba0d
child 10526 b43d175d1577
equal deleted inserted replaced
10511:c33b2f001730 10512:25021aac078e
   554         skipDecay := _0_87;
   554         skipDecay := _0_87;
   555 
   555 
   556 
   556 
   557         // skipping
   557         // skipping
   558 
   558 
   559         if (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > skipSpeed)
   559         if (not isSubmersible) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > skipSpeed)
   560         and ( ((not isDirH) and (hwAbs(Gear^.dX) > skipAngle * hwAbs(Gear^.dY)))
   560         and ( ((not isDirH) and (hwAbs(Gear^.dX) > skipAngle * hwAbs(Gear^.dY)))
   561           or (isDirH and (hwAbs(Gear^.dY) > skipAngle * hwAbs(Gear^.dX))) ) then
   561           or (isDirH and (hwAbs(Gear^.dY) > skipAngle * hwAbs(Gear^.dX))) ) then
   562             begin
   562             begin
   563             isSkip:= true;
   563             isSkip:= true;
   564             // if skipping we move the gear out of water
   564             // if skipping we move the gear out of water