810 DrawExplosion(i, hwRound(Gear^.Y) + 3, 3); |
810 DrawExplosion(i, hwRound(Gear^.Y) + 3, 3); |
811 inc(i, 1) |
811 inc(i, 1) |
812 end; |
812 end; |
813 |
813 |
814 if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9) |
814 if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9) |
815 , LAND_INDESTRUCTIBLE) then |
815 , lfIndestructible) then |
816 begin |
816 begin |
817 Gear^.X := Gear^.X + Gear^.dX; |
817 Gear^.X := Gear^.X + Gear^.dX; |
818 Gear^.Y := Gear^.Y + _1_9; |
818 Gear^.Y := Gear^.Y + _1_9; |
819 end; |
819 end; |
820 SetAllHHToActive; |
820 SetAllHHToActive; |
920 prevX := hwRound(HHGear^.X); |
920 prevX := hwRound(HHGear^.X); |
921 |
921 |
922 // why the call to HedgehogStep then a further increment of X? |
922 // why the call to HedgehogStep then a further increment of X? |
923 if (prevX = hwRound(HHGear^.X)) and |
923 if (prevX = hwRound(HHGear^.X)) and |
924 CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), |
924 CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), |
925 LAND_INDESTRUCTIBLE) then HedgehogStep(HHGear); |
925 lfIndestructible) then HedgehogStep(HHGear); |
926 |
926 |
927 if (prevX = hwRound(HHGear^.X)) and |
927 if (prevX = hwRound(HHGear^.X)) and |
928 CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), |
928 CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), |
929 LAND_INDESTRUCTIBLE) then HHGear^.X := HHGear^.X + SignAs(_1, HHGear^.dX); |
929 lfIndestructible) then HHGear^.X := HHGear^.X + SignAs(_1, HHGear^.dX); |
930 HHGear^.State := HHGear^.State or gstAttacking |
930 HHGear^.State := HHGear^.State or gstAttacking |
931 end; |
931 end; |
932 |
932 |
933 inc(BTSteps); |
933 inc(BTSteps); |
934 if BTSteps = 7 then |
934 if BTSteps = 7 then |
935 begin |
935 begin |
936 BTSteps := 0; |
936 BTSteps := 0; |
937 if CheckLandValue(hwRound(HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC) + SignAs(_6, |
937 if CheckLandValue(hwRound(HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC) + SignAs(_6, |
938 Gear^.dX)), hwRound(HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC)), |
938 Gear^.dX)), hwRound(HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC)), |
939 LAND_INDESTRUCTIBLE) then |
939 lfIndestructible) then |
940 begin |
940 begin |
941 Gear^.X := HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC); |
941 Gear^.X := HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC); |
942 Gear^.Y := HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC); |
942 Gear^.Y := HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC); |
943 end; |
943 end; |
944 HHGear^.State := HHGear^.State or gstNoDamage; |
944 HHGear^.State := HHGear^.State or gstNoDamage; |
1793 AfterAttack; |
1793 AfterAttack; |
1794 exit |
1794 exit |
1795 end; |
1795 end; |
1796 |
1796 |
1797 if CheckLandValue(hwRound(HHGear^.X), hwRound(HHGear^.Y + HHGear^.dY + SignAs(_6,Gear^.dY)), |
1797 if CheckLandValue(hwRound(HHGear^.X), hwRound(HHGear^.Y + HHGear^.dY + SignAs(_6,Gear^.dY)), |
1798 LAND_INDESTRUCTIBLE) then |
1798 lfIndestructible) then |
1799 HHGear^.Y := HHGear^.Y + HHGear^.dY |
1799 HHGear^.Y := HHGear^.Y + HHGear^.dY |
1800 end; |
1800 end; |
1801 |
1801 |
1802 procedure doStepFirePunch(Gear: PGear); |
1802 procedure doStepFirePunch(Gear: PGear); |
1803 var |
1803 var |
2543 if (Gear^.Timer = 0) |
2543 if (Gear^.Timer = 0) |
2544 or (t^.Count <> 0) |
2544 or (t^.Count <> 0) |
2545 or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) |
2545 or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) |
2546 and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX))) |
2546 and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX))) |
2547 // CheckLandValue returns true if the type isn't matched |
2547 // CheckLandValue returns true if the type isn't matched |
2548 or not CheckLandValue(hwRound(Gear^.Y), hwRound(Gear^.X), LAND_INDESTRUCTIBLE) then |
2548 or not CheckLandValue(hwRound(Gear^.Y), hwRound(Gear^.X), lfIndestructible) then |
2549 begin |
2549 begin |
2550 //out of time or exited ground |
2550 //out of time or exited ground |
2551 StopSound(Gear^.SoundChannel); |
2551 StopSound(Gear^.SoundChannel); |
2552 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
2552 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
2553 DeleteGear(Gear); |
2553 DeleteGear(Gear); |