hedgewars/GSHandlers.inc
changeset 6380 1ff5ad1d771b
parent 6368 cd819d9df6f6
child 6385 e6d30db1e3b0
equal deleted inserted replaced
6379:ef4288298e57 6380:1ff5ad1d771b
  3639     i:= Gear^.Health div 20;
  3639     i:= Gear^.Health div 20;
  3640     if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  3640     if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  3641         begin
  3641         begin
  3642         Gear^.Damage:= i;
  3642         Gear^.Damage:= i;
  3643         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3643         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3644         if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
  3644         FreeTexture(Gear^.Tex);
  3645         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  3645         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  3646                      '%', cWhiteColor, fntSmall)
  3646                      '%', cWhiteColor, fntSmall)
  3647         end;
  3647         end;
  3648 
  3648 
  3649     if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^
  3649     if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^
  4683         begin
  4683         begin
  4684         i:= Gear^.Health div 5;
  4684         i:= Gear^.Health div 5;
  4685         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4685         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4686             begin
  4686             begin
  4687             Gear^.Damage:= i;
  4687             Gear^.Damage:= i;
  4688             if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
  4688             FreeTexture(Gear^.Tex);
  4689             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4689             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4690                          '%', cWhiteColor, fntSmall)
  4690                          '%', cWhiteColor, fntSmall)
  4691             end
  4691             end
  4692         end
  4692         end
  4693 end;
  4693 end;
  4755         begin
  4755         begin
  4756         i:= Gear^.Health div 10;
  4756         i:= Gear^.Health div 10;
  4757         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4757         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4758             begin
  4758             begin
  4759             Gear^.Damage:= i;
  4759             Gear^.Damage:= i;
  4760             if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
  4760             FreeTexture(Gear^.Tex);
  4761             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4761             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4762                          '%', cWhiteColor, fntSmall)
  4762                          '%', cWhiteColor, fntSmall)
  4763             end
  4763             end
  4764         end
  4764         end
  4765 end;
  4765 end;