hedgewars/GSHandlers.inc
changeset 4260 472fd2fc1f31
parent 4258 1766fbab35d8
child 4262 154253f77b03
equal deleted inserted replaced
4258:1766fbab35d8 4260:472fd2fc1f31
  3057         Gear^.Timer := 0;
  3057         Gear^.Timer := 0;
  3058         Gear^.MsgParam := 0
  3058         Gear^.MsgParam := 0
  3059     end;
  3059     end;
  3060 
  3060 
  3061     if Gear^.Health < 0 then Gear^.Health := 0;
  3061     if Gear^.Health < 0 then Gear^.Health := 0;
  3062     if (GameTicks and $3F) = 0 then
  3062     i:= Gear^.Health div 20;
  3063         begin
  3063     if i <> Gear^.Damage then
       
  3064         begin
       
  3065         Gear^.Damage:= i;
  3064         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3066         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3065         if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
  3067         if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
  3066         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) +
  3068         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  3067                      '%', cWhiteColor, fntSmall)
  3069                      '%', cWhiteColor, fntSmall)
  3068         end;
  3070         end;
  3069 
  3071 
  3070     if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^
  3072     if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^
  3071         .State := Gear^.State and not gsttmpFlag;
  3073         .State := Gear^.State and not gsttmpFlag;