hedgewars/uGearsRender.pas
changeset 5787 f2caf41f2984
parent 5740 caf10b231b08
child 5824 2e5835130d9a
child 5871 09daa06191d7
--- a/hedgewars/uGearsRender.pas	Mon Sep 05 15:05:46 2011 -0400
+++ b/hedgewars/uGearsRender.pas	Mon Sep 05 15:32:58 2011 -0400
@@ -1071,14 +1071,18 @@
                         //DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1);
                         Tint($FF, $FF, $FF, $FF);
                         end
-                    else if not isInLag then
+                    else //if not isInLag then
                         begin
+                        if isInLag and (Gear^.FlightTime < 256) then inc(Gear^.FlightTime, 8)
+                        else if not isInLag and (Gear^.FlightTime > 0) then dec(Gear^.FlightTime, 8);
+                        if Gear^.FlightTime > 0 then Tint($FF, $FF, $FF, $FF-min(255,Gear^.FlightTime));
                         if vobVelocity = 0 then
                             DrawSprite(sprFlake, x, y, Gear^.Timer)
                         else
-                            DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle)
+                            DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle);
 //DrawSprite(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer)
 //DrawRotatedF(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer, 1, Gear^.DirAngle);
+                        if Gear^.FlightTime > 0 then Tint($FF, $FF, $FF, $FF);
                         end;
        gtStructure: DrawSprite(sprTarget, x - 16, y - 16, 0);
           gtTardis: if Gear^.Pos <> 4 then