1895 if Gear^.dX.isNegative then |
1896 if Gear^.dX.isNegative then |
1896 HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmLeft |
1897 HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmLeft |
1897 else |
1898 else |
1898 HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmRight; |
1899 HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmRight; |
1899 |
1900 |
1900 if ((HHGear^.State and gstMoving) = 0) then |
1901 if (HHGear^.State and gstMoving) = 0 then |
1901 begin |
1902 begin |
1902 HHGear^.State := HHGear^.State and (not gstAttacking); |
1903 HHGear^.State := HHGear^.State and (not gstAttacking); |
1903 |
1904 |
1904 if CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y),lfIndestructible) then |
1905 if CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y), lfIndestructible) then |
1905 HedgehogStep(HHGear); |
1906 HedgehogStep(HHGear); |
1906 |
1907 |
1907 HHGear^.State := HHGear^.State or gstAttacking |
1908 HHGear^.State := HHGear^.State or gstAttacking |
1908 end; |
1909 end; |
1909 |
1910 |
|
1911 newX := HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC); |
|
1912 newY := HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC); |
|
1913 if CheckLandValue(hwRound(newX + SignAs(_6, Gear^.dX)), hwRound(newY), lfIndestructible) then |
|
1914 begin |
|
1915 Gear^.X := newX; |
|
1916 Gear^.Y := newY; |
|
1917 end; |
|
1918 |
1910 inc(BTSteps); |
1919 inc(BTSteps); |
1911 if BTSteps = 11 then |
1920 if BTSteps = 15 then |
1912 begin |
1921 begin |
1913 BTSteps := 0; |
1922 BTSteps := 0; |
1914 if CheckLandValue(hwRound(HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC) + SignAs(_6,Gear^.dX)), hwRound(HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC)),lfIndestructible) then |
|
1915 begin |
|
1916 Gear^.X := HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC); |
|
1917 Gear^.Y := HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC); |
|
1918 end; |
|
1919 hit := true |
1923 hit := true |
1920 end; |
1924 end; |
1921 end; |
1925 end; |
1922 |
1926 |
1923 if dig then |
1927 if dig then |