636 |
636 |
637 if ((Gear^.Message and gmLJump ) <> 0) then |
637 if ((Gear^.Message and gmLJump ) <> 0) then |
638 begin |
638 begin |
639 Gear^.Message:= Gear^.Message and not gmLJump; |
639 Gear^.Message:= Gear^.Message and not gmLJump; |
640 DeleteCI(Gear); |
640 DeleteCI(Gear); |
641 if not TestCollisionYwithGear(Gear, -1) then |
641 if TestCollisionYwithGear(Gear, -1) = 0 then |
642 if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _2 else |
642 if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _2 else |
643 if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _1; |
643 if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _1; |
644 if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) |
644 if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) |
645 or TestCollisionYwithGear(Gear, -1)) then |
645 or (TestCollisionYwithGear(Gear, -1) <> 0)) then |
646 begin |
646 begin |
647 Gear^.dY:= -_0_15; |
647 Gear^.dY:= -_0_15; |
648 if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX); |
648 if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX); |
649 Gear^.State:= Gear^.State or gstMoving or gstHHJumping; |
649 Gear^.State:= Gear^.State or gstMoving or gstHHJumping; |
650 PlaySound(sndJump1, Gear^.Hedgehog^.Team^.voicepack); |
650 PlaySound(sndJump1, Gear^.Hedgehog^.Team^.voicepack); |
683 |
683 |
684 Gear^.Hedgehog^.visStepPos:= (Gear^.Hedgehog^.visStepPos + 1) and 7; |
684 Gear^.Hedgehog^.visStepPos:= (Gear^.Hedgehog^.visStepPos + 1) and 7; |
685 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
685 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
686 begin |
686 begin |
687 if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX)) |
687 if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX)) |
688 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
688 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
689 if not (TestCollisionXwithXYShift(Gear, _0, -5, hwSign(Gear^.dX)) |
689 if not (TestCollisionXwithXYShift(Gear, _0, -5, hwSign(Gear^.dX)) |
690 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
690 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
691 if not (TestCollisionXwithXYShift(Gear, _0, -4, hwSign(Gear^.dX)) |
691 if not (TestCollisionXwithXYShift(Gear, _0, -4, hwSign(Gear^.dX)) |
692 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
692 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
693 if not (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX)) |
693 if not (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX)) |
694 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
694 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
695 if not (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) |
695 if not (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) |
696 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
696 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
697 if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) |
697 if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) |
698 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
698 or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1; |
699 end; |
699 end; |
700 |
700 |
701 if (not cArtillery) and ((Gear^.Message and gmPrecise) = 0) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then |
701 if (not cArtillery) and ((Gear^.Message and gmPrecise) = 0) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then |
702 Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); |
702 Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); |
703 |
703 |
704 SetAllHHToActive; |
704 SetAllHHToActive; |
705 |
705 |
706 if not TestCollisionYwithGear(Gear, 1) then |
706 if TestCollisionYwithGear(Gear, 1) = 0 then |
707 begin |
707 begin |
708 Gear^.Y:= Gear^.Y + _1; |
708 Gear^.Y:= Gear^.Y + _1; |
709 if not TestCollisionYwithGear(Gear, 1) then |
709 if TestCollisionYwithGear(Gear, 1) = 0 then |
710 begin |
710 begin |
711 Gear^.Y:= Gear^.Y + _1; |
711 Gear^.Y:= Gear^.Y + _1; |
712 if not TestCollisionYwithGear(Gear, 1) then |
712 if TestCollisionYwithGear(Gear, 1) = 0 then |
713 begin |
713 begin |
714 Gear^.Y:= Gear^.Y + _1; |
714 Gear^.Y:= Gear^.Y + _1; |
715 if not TestCollisionYwithGear(Gear, 1) then |
715 if TestCollisionYwithGear(Gear, 1) = 0 then |
716 begin |
716 begin |
717 Gear^.Y:= Gear^.Y + _1; |
717 Gear^.Y:= Gear^.Y + _1; |
718 if not TestCollisionYwithGear(Gear, 1) then |
718 if TestCollisionYwithGear(Gear, 1) = 0 then |
719 begin |
719 begin |
720 Gear^.Y:= Gear^.Y + _1; |
720 Gear^.Y:= Gear^.Y + _1; |
721 if not TestCollisionYwithGear(Gear, 1) then |
721 if TestCollisionYwithGear(Gear, 1) = 0 then |
722 begin |
722 begin |
723 Gear^.Y:= Gear^.Y + _1; |
723 Gear^.Y:= Gear^.Y + _1; |
724 if not TestCollisionYwithGear(Gear, 1) then |
724 if TestCollisionYwithGear(Gear, 1) = 0 then |
725 begin |
725 begin |
726 Gear^.Y:= Gear^.Y - _6; |
726 Gear^.Y:= Gear^.Y - _6; |
727 Gear^.dY:= _0; |
727 Gear^.dY:= _0; |
728 Gear^.State:= Gear^.State or gstMoving; |
728 Gear^.State:= Gear^.State or gstMoving; |
729 exit |
729 exit |