Also switch saucer from updating every N ticks to updating as-needed.
authornemo
Fri, 12 Nov 2010 12:30:22 -0500 (2010-11-12)
changeset 4260 472fd2fc1f31
parent 4258 1766fbab35d8
child 4262 154253f77b03
Also switch saucer from updating every N ticks to updating as-needed.
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- 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;
 
--- a/hedgewars/uGears.pas	Fri Nov 12 12:25:38 2010 -0500
+++ b/hedgewars/uGears.pas	Fri Nov 12 12:30:22 2010 -0500
@@ -494,6 +494,7 @@
                 end;
      gtJetpack: begin
                 gear^.Health:= 2000;
+                gear^.Damage:= 100
                 end;
      gtMolotov: begin
                 gear^.Radius:= 6;