hedgewars/uGearsHandlersMess.pas
changeset 10123 64e72781d344
parent 10118 788703011d20
child 10125 7a77a819a94d
equal deleted inserted replaced
10122:cefede760264 10123:64e72781d344
  3546     if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  3546     if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  3547         begin
  3547         begin
  3548         Gear^.Damage:= i;
  3548         Gear^.Damage:= i;
  3549         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3549         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
  3550         FreeTexture(Gear^.Tex);
  3550         FreeTexture(Gear^.Tex);
  3551         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) + '%', cWhiteColor, fntSmall)
  3551         Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ansistring(': ' + inttostr(i) + '%'), cWhiteColor, fntSmall)
  3552         end;
  3552         end;
  3553 
  3553 
  3554     if (HHGear^.Message and (gmAttack or gmUp or gmLeft or gmRight) <> 0) and
  3554     if (HHGear^.Message and (gmAttack or gmUp or gmLeft or gmRight) <> 0) and
  3555        (HHGear^.Message and gmPrecise = 0) then
  3555        (HHGear^.Message and gmPrecise = 0) then
  3556         Gear^.State := Gear^.State and (not gsttmpFlag);
  3556         Gear^.State := Gear^.State and (not gsttmpFlag);
  4703         i:= Gear^.Health div 5;
  4703         i:= Gear^.Health div 5;
  4704         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4704         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4705             begin
  4705             begin
  4706             Gear^.Damage:= i;
  4706             Gear^.Damage:= i;
  4707             FreeTexture(Gear^.Tex);
  4707             FreeTexture(Gear^.Tex);
  4708             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4708             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ansistring(': ' + inttostr(i) +
  4709                          '%', cWhiteColor, fntSmall)
  4709                          '%'), cWhiteColor, fntSmall)
  4710             end
  4710             end
  4711         end
  4711         end
  4712 end;
  4712 end;
  4713 
  4713 
  4714 procedure doStepFlamethrower(Gear: PGear);
  4714 procedure doStepFlamethrower(Gear: PGear);
  4780         i:= Gear^.Health div 10;
  4780         i:= Gear^.Health div 10;
  4781         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4781         if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  4782             begin
  4782             begin
  4783             Gear^.Damage:= i;
  4783             Gear^.Damage:= i;
  4784             FreeTexture(Gear^.Tex);
  4784             FreeTexture(Gear^.Tex);
  4785             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
  4785             Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ansistring(': ' + inttostr(i) +
  4786                          '%', cWhiteColor, fntSmall)
  4786                          '%'), cWhiteColor, fntSmall)
  4787             end
  4787             end
  4788         end
  4788         end
  4789 end;
  4789 end;
  4790 
  4790 
  4791 procedure doStepLandGun(Gear: PGear);
  4791 procedure doStepLandGun(Gear: PGear);
  5385     t:= Gear^.Health div 10;
  5385     t:= Gear^.Health div 10;
  5386     if (t <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  5386     if (t <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
  5387     begin
  5387     begin
  5388     Gear^.Damage:= t;
  5388     Gear^.Damage:= t;
  5389     FreeTexture(Gear^.Tex);
  5389     FreeTexture(Gear^.Tex);
  5390     Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(t) +
  5390     Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ansistring(': ' + inttostr(t) +
  5391               '%', cWhiteColor, fntSmall)
  5391               '%'), cWhiteColor, fntSmall)
  5392     end;
  5392     end;
  5393     if Gear^.Message and (gmUp or gmDown) <> 0 then
  5393     if Gear^.Message and (gmUp or gmDown) <> 0 then
  5394         begin
  5394         begin
  5395         StopSoundChan(Gear^.SoundChannel);
  5395         StopSoundChan(Gear^.SoundChannel);
  5396         Gear^.SoundChannel:= -1;
  5396         Gear^.SoundChannel:= -1;