810 exit(false); |
810 exit(false); |
811 |
811 |
812 jmpLJump: |
812 jmpLJump: |
813 begin |
813 begin |
814 if TestCollisionYwithGear(Gear, -1) <> 0 then |
814 if TestCollisionYwithGear(Gear, -1) <> 0 then |
815 if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then |
815 if TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) = 0 then |
816 Gear^.Y:= Gear^.Y - int2hwFloat(2) |
816 Gear^.Y:= Gear^.Y - int2hwFloat(2) |
817 else |
817 else |
818 if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then |
818 if TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) = 0 then |
819 Gear^.Y:= Gear^.Y - _1; |
819 Gear^.Y:= Gear^.Y - _1; |
820 if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) or |
820 if (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0) and |
821 (TestCollisionYwithGear(Gear, -1) <> 0)) then |
821 (TestCollisionYwithGear(Gear, -1) = 0) then |
822 begin |
822 begin |
823 Gear^.dY:= -_0_15; |
823 Gear^.dY:= -_0_15; |
824 Gear^.dX:= SignAs(_0_15, Gear^.dX); |
824 Gear^.dX:= SignAs(_0_15, Gear^.dX); |
825 Gear^.State:= Gear^.State or gstMoving or gstHHJumping |
825 Gear^.State:= Gear^.State or gstMoving or gstHHJumping |
826 end |
826 end |
844 if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then |
844 if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then |
845 begin |
845 begin |
846 Gear^.dY:= -_0_25; |
846 Gear^.dY:= -_0_25; |
847 Gear^.dX:= SignAs(_0_02, Gear^.dX) |
847 Gear^.dX:= SignAs(_0_02, Gear^.dX) |
848 end; |
848 end; |
849 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX); |
849 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then SetLittle(Gear^.dX); |
850 Gear^.X:= Gear^.X + Gear^.dX; |
850 Gear^.X:= Gear^.X + Gear^.dX; |
851 inc(GoInfo.Ticks); |
851 inc(GoInfo.Ticks); |
852 Gear^.dY:= Gear^.dY + cGravity; |
852 Gear^.dY:= Gear^.dY + cGravity; |
853 if Gear^.dY > _0_4 then |
853 if Gear^.dY > _0_4 then |
854 exit(false); |
854 exit(false); |