1809 end; |
1809 end; |
1810 Gear^.FlightTime:= GameTicks + 10000 |
1810 Gear^.FlightTime:= GameTicks + 10000 |
1811 end; |
1811 end; |
1812 if targ <> nil then |
1812 if targ <> nil then |
1813 begin |
1813 begin |
|
1814 AddVisualGear(hwRound(targ^.X), hwRound(targ^.Y), vgtBubble); |
1814 trackSpeed.QWordValue:= Gear^.Power; |
1815 trackSpeed.QWordValue:= Gear^.Power; |
1815 if (Gear^.X < targ^.X) and (Gear^.dX < _0_1) then |
1816 if (Gear^.X < targ^.X) and (Gear^.dX < _0_1) then |
1816 Gear^.dX:= Gear^.dX+trackSpeed |
1817 Gear^.dX:= Gear^.dX+trackSpeed |
1817 else if (Gear^.X > targ^.X) and (Gear^.dX > -_0_1) then |
1818 else if (Gear^.X > targ^.X) and (Gear^.dX > -_0_1) then |
1818 Gear^.dX:= Gear^.dX-trackSpeed; |
1819 Gear^.dX:= Gear^.dX-trackSpeed; |
1824 |
1825 |
1825 if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then |
1826 if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then |
1826 if ((Gear^.State and gstAttacking) = 0) then |
1827 if ((Gear^.State and gstAttacking) = 0) then |
1827 begin |
1828 begin |
1828 if ((GameTicks and $1F) = 0) then |
1829 if ((GameTicks and $1F) = 0) then |
|
1830 begin |
1829 if targ <> nil then |
1831 if targ <> nil then |
1830 begin |
1832 begin |
1831 tX:=Gear^.X-targ^.X; |
1833 tX:=Gear^.X-targ^.X; |
1832 tY:=Gear^.Y-targ^.Y; |
1834 tY:=Gear^.Y-targ^.Y; |
1833 if (tX.Round+tY.Round < Gear^.Karma) and |
1835 if (tX.Round+tY.Round < Gear^.Karma) and |
1834 (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Karma)) then |
1836 (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Karma)) then |
1835 Gear^.State := Gear^.State or gstAttacking |
1837 Gear^.State := Gear^.State or gstAttacking |
1836 end |
1838 end |
1837 else if (Gear^.Angle > 0) and (CheckGearNear(Gear, gtHedgehog, Gear^.Karma, Gear^.Karma) <> nil) then |
1839 else if (Gear^.Angle > 0) and (CheckGearNear(Gear, gtHedgehog, Gear^.Karma, Gear^.Karma) <> nil) then |
1838 Gear^.State := Gear^.State or gstAttacking |
1840 Gear^.State := Gear^.State or gstAttacking |
|
1841 end |
1839 end |
1842 end |
1840 else // gstAttacking <> 0 |
1843 else // gstAttacking <> 0 |
1841 begin |
1844 begin |
1842 AllInactive := false; |
1845 AllInactive := false; |
1843 if (Gear^.Timer and $FF) = 0 then |
1846 if (Gear^.Timer and $FF) = 0 then |