2828 dec(Gear^.Health, fuel div 5); |
2828 dec(Gear^.Health, fuel div 5); |
2829 Gear^.MsgParam:= Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right)); |
2829 Gear^.MsgParam:= Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right)); |
2830 end; |
2830 end; |
2831 |
2831 |
2832 if Gear^.Health < 0 then Gear^.Health:= 0; |
2832 if Gear^.Health < 0 then Gear^.Health:= 0; |
2833 if (GameTicks and $7F) = 0 then |
2833 if ((GameTicks and $FF) = 0) and (Gear^.Health < 500) then |
2834 begin |
2834 for i:= ((500-Gear^.Health) div 250) downto 0 do |
2835 if Gear^.Health < 1000 then |
2835 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFeather); |
2836 for i:= ((1000-Gear^.Health) div 250) downto 0 do |
|
2837 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFeather); |
|
2838 if Gear^.Tex <> nil then FreeTexture(Gear^.Tex); |
|
2839 Gear^.Tex:= RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) + '%', cWhiteColor, fntSmall) |
|
2840 end; |
|
2841 |
2836 |
2842 if (HHGear^.Message and gm_Attack <> 0) then begin |
2837 if (HHGear^.Message and gm_Attack <> 0) then begin |
2843 HHGear^.Message := HHGear^.Message and not gm_Attack; |
2838 HHGear^.Message := HHGear^.Message and not gm_Attack; |
2844 if Gear^.FlightTime > 0 then begin |
2839 if Gear^.FlightTime > 0 then begin |
2845 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0); |
2840 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0); |