hedgewars/GSHandlers.inc
changeset 4260 472fd2fc1f31
parent 4258 1766fbab35d8
child 4262 154253f77b03
--- a/hedgewars/GSHandlers.inc	Fri Nov 12 12:25:38 2010 -0500
+++ b/hedgewars/GSHandlers.inc	Fri Nov 12 12:30:22 2010 -0500
@@ -3059,11 +3059,13 @@
     end;
 
     if Gear^.Health < 0 then Gear^.Health := 0;
-    if (GameTicks and $3F) = 0 then
+    i:= Gear^.Health div 20;
+    if i <> Gear^.Damage then
         begin
+        Gear^.Damage:= i;
         //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
         if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
-        Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) +
+        Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) +
                      '%', cWhiteColor, fntSmall)
         end;