# HG changeset patch # User nemo # Date 1315251178 14400 # Node ID f2caf41f2984a8fd59da43e5129b22e8604b1c3e # Parent ffe2401e287f964b35c0d997cfc8668fbcc4a0bc Add a fade out when in lag for snow. diff -r ffe2401e287f -r f2caf41f2984 hedgewars/uGearsRender.pas --- 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