ok... combine a tick check with texture percentage check. this should be a lot less frequent
--- a/hedgewars/GSHandlers.inc Fri Nov 12 12:30:22 2010 -0500
+++ b/hedgewars/GSHandlers.inc Fri Nov 12 12:35:30 2010 -0500
@@ -3053,14 +3053,14 @@
// erases them all at once :-/
if (Gear^.Timer <> 0) and (GameTicks - Gear^.Timer > 250) then
- begin
+ begin
Gear^.Timer := 0;
Gear^.MsgParam := 0
- end;
+ end;
if Gear^.Health < 0 then Gear^.Health := 0;
i:= Gear^.Health div 20;
- if i <> Gear^.Damage then
+ if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
begin
Gear^.Damage:= i;
//AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate);
@@ -4046,7 +4046,7 @@
else
begin
i:= Gear^.Health div 5;
- if i <> Gear^.Damage then
+ if (i <> Gear^.Damage) and ((GameTicks and $3F) = 0) then
begin
Gear^.Damage:= i;
if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);